I have 2 cards in a stack (attached). Card 1 shows few text lines that can be selected with a checkbox an viewed by sclicking on the 'My Selection' button.
Toggling selection of lines and switching between 'All Lines' view and 'My Selection' view works OK - the checkboxes get selected/diselected in a proper way.
When I click on the text line itself I go to a card 2 showing the whole text line. On that card I placed a checkbox to be able to toggle selection as well.
But that checkbox is not selecting/diselecting the checkboxes properly on the previous card or previous view.
I've used this code for the checkbox:
Code: Select all
global gAllLines,gMySelection,gMySelectedLineNrs,gCurentIndex
on mouseUp
set the itemDelimiter to tab
if the hilite of me is "true" then
put "true" into item 2 of line gCurentIndex of gMySelection
put "true" into item 2 of line gCurentIndex of gAllLines
else
put "false" into item 2 of line gCurentIndex of gMySelection
put "false" into item 2 of line gCurentIndex of gAllLines
end if
RefreshAllLines
end mouseUp
and this code for the card it is on:
Code: Select all
global gMySelection,gMySelectedLineNrs,gCurrentLineNr,gCurrentLine,gCurentIndex
on openCard
set itemDel to tab
put gCurentIndex into fld "a" --- used during development
put gCurrentLine into fld "b" --- used during development
if gCurentIndex is among the items of gMySelectedLineNrs then
set the hilite of btn "Check" to "true"
else
set the hilite of btn "Check" to "false"
end if
end openCard
Any ideas how to correct this?
Thanks in advance.
keram