select the clickLine issue
Posted: Sat Nov 12, 2011 1:51 pm
I have a list field where each line links to a data set.
New lines are added with "Click here to add page" forming the end of the list.
There are 2 normal text fields designed to save their respcetive contents automatically when the focus changes.
as below
on closefield
set the itemdelimiter to tab
put the RTFText of field "Comment" into URL ("file:" & WorkFolder & item 7 of line tSelLine of field "Index" on card 2)
end closefield
I have found that if the user does not tab away from the normal field or click in the other normal field before clicking the "Click here to add page" in the list field, the process fails.
The code that fails is:- (marked by **************** and is not part of the code)
on mouseDown
enableReorder (long id of me)
select the clickLine ***************************This is the line that fails (Line 4)*********
put the hilitedline of field "Index" on card 2 into tSelLine
set the itemdelimiter to tab
put WorkFolder & item 5 of line tSelLine of field "Index" on card 2 into VarDeleteLine5 --Prepare for line to be deleted
put WorkFolder & item 7 of line tSelLine of field "Index" on card 2 into VarDeleteLine7 --Prepare for line to be deleted
put WorkFolder & item 8 of line tSelLine of field "Index" on card 2 into VarDeleteLine8 --Prepare for line to be deleted
end mouseDown
and the reason is "field "Index": execution error at line 4 (Chunk: no target found), char 13"
I need to find a way of ending the focus in the normal fields if the user goes from input to "Click here to add page" in the list field.
Any ideas please!
New lines are added with "Click here to add page" forming the end of the list.
There are 2 normal text fields designed to save their respcetive contents automatically when the focus changes.
as below
on closefield
set the itemdelimiter to tab
put the RTFText of field "Comment" into URL ("file:" & WorkFolder & item 7 of line tSelLine of field "Index" on card 2)
end closefield
I have found that if the user does not tab away from the normal field or click in the other normal field before clicking the "Click here to add page" in the list field, the process fails.
The code that fails is:- (marked by **************** and is not part of the code)
on mouseDown
enableReorder (long id of me)
select the clickLine ***************************This is the line that fails (Line 4)*********
put the hilitedline of field "Index" on card 2 into tSelLine
set the itemdelimiter to tab
put WorkFolder & item 5 of line tSelLine of field "Index" on card 2 into VarDeleteLine5 --Prepare for line to be deleted
put WorkFolder & item 7 of line tSelLine of field "Index" on card 2 into VarDeleteLine7 --Prepare for line to be deleted
put WorkFolder & item 8 of line tSelLine of field "Index" on card 2 into VarDeleteLine8 --Prepare for line to be deleted
end mouseDown
and the reason is "field "Index": execution error at line 4 (Chunk: no target found), char 13"
I need to find a way of ending the focus in the normal fields if the user goes from input to "Click here to add page" in the list field.
Any ideas please!