I have a stack (see attachment) with a field containing lines - for simplicity they are just numbers.
When clicking on a line (number) in on the left side (q_list) the number is highlighted and turns into red color. At the same time it gets copied to the field on the right side (favorites) and the checkbox get selected.
When I disselect the checkbox the number on the left gets unhighlighted into grey color, and it gets deleted from the favorites field on the right.
So far it's OK. But when I try to select the checkbox again for the same number on the left then I'm getting this error:
button "Check": execution error at line 9 (Chunk: no target found), char 25
on line set the textColor of foundChunk() to "red" in the checkbox script which is this:
Code: Select all
global gFavorites
on mouseUp
local tQuote
get the text of fld "1line_f"
put it into tQuote
find whole tQuote in the fld "q_list"
if the hilite of me is true then
if tQuote is not among the lines of gFavorites then put tQuote&cr&cr after gFavorites --no duplicate lines
set the textColor of foundChunk() to "red"
else
if tQuote is among the lines of gFavorites then filter lines of gFavorites without it --delete that line from fld "favorites"
set the textColor of foundChunk() to "#505050"
end if
refreshFavorites -- script on the stack level
end mouseUp
How to correct the script to get it working OK?
Thanks!
keram