Pre-select / highlight list field lines on cardOpen?
Keith Clarke
keith.clarke at me.com
Sun Mar 15 18:50:49 EDT 2015
Folks,
I’m using the selected lines of a list field as a simple filter. However, when I navigate from the card & return, the selected lines are forgotten - so the filter has to be reset manually.
So, I’ve added a script to trap the selections & save to stack-level custom properties, so they’re available on cardOpen...
on mouseUp
put the selectedText of me into tScheduleFieldSelected
set the ScheduleFieldSelected of this stack to tScheduleFieldSelected
end mouseUp
… but I’m struggling with errors on the openCard script to set the selected lines...
on openCard
// Set the Extract folder
// Get the CSV files into memory
// Get Selected Field
put the ScheduleFieldSelected of this stack into tScheduleFieldSelected
repeat for each line tField in field ScheduleFields
if tField is among the lines of tScheduleFieldSelected then highlight tField
end repeat
end openCard
LiveCode errors with ...(Handler: can't find handler) near “highlight”...
Is this a simple syntax issue or is it not possible to select / highlight list field lines via code? I can’t find anything in the documentation or Google on forcing selection in lists.
Thanks & regards,
Keith..
More information about the use-livecode
mailing list