Pre-select / highlight list field lines on cardOpen?
keith.clarke at me.com
Sun Mar 15 18:50:49 EDT 2015
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...
put the selectedText of me into tScheduleFieldSelected
set the ScheduleFieldSelected of this stack to tScheduleFieldSelected
… but I’m struggling with errors on the openCard script to set the selected lines...
// 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
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,
More information about the Use-livecode