unhilite line in list field

Klaus Major klaus at major-k.de
Thu Dec 23 11:57:07 EST 2004


Hi Paul,

>>> Hi
>>> My script has a list field where each selection is utilized in turn.
>>> I would like the selection to be unhilited in turn after it is
>>> utilized,
>>> so that as the repeats are worked through the highlights turn off.
>>> Possible?
>>> This doesn't work --
>>>
>>> repeat for each line mychoice in the selectedText of fld 
>>> "mylistfield"
>>> 	doSomething
>>> 	unhilite mychoice of the selectedText of fld "mylistfield"  -- ?????
>>> end repeat
>>>
>>> but, has anyone  found a way to do this?
>>
>> Just to see if i get you right:
>>
>> You want to "unhilite" ALL lines AFTER you did something with the
>> hilited lines?
>
> Sorry I wasn't clear
> I want to unhilite EACH line after something is done with that 
> particular line .
> The highlights would go off one after the other as the repeats are 
> worked through, thus indicating to the user the progress of the 
> process.
> Probably not possible. I thought I would throw it out

Ah, know i understand :-)

Sure this is possible...

...
  put the hilitedlines of fld "mylistfield" into tLines
  put tLines into remaininglines
repeat for each item i in tLines
     ## do something with: line i of fld "mylistfield"
     delete item 1 of remaininglines
     set the hilitedlines of fld "mylistfield" to remaininglines
end repeat
...

Tested and works :-)

> Paul

Regards

Klaus Major
klaus at major-k.de
http://www.major-k.de



More information about the use-livecode mailing list