How Do I Select Text in a Field?

Sarah Reichelt sarahr at genesearch.com.au
Tue Mar 16 01:10:12 EST 2004


> The field displays the contents of a file selected from a list field. 
> This list is refreshed (because files are being added to the storage 
> folder at random intervals) with the following button script:
>
> on mouseUp
>   getFiles - checks the contents of the storage folder and puts the 
> list in the list field
>   send mouseUp to me in 60 seconds - so I click the button once and it 
> runs all day :)
> end mouseUp
>
> Could this activity be causing the text to be deselected? Is there a 
> better way to time a repeating task to allow for normal stack 
> operation?
>
Yes - if you are "putting" a new list into the field every minute, 
whenever that new data is put into the field, your selection will be 
lost. If it is a list field, then the easiest way to go is to store the 
hilitedLines at the start of the mouseUp and reset them at the end. If 
it is not a list field, you will have to store the selectedChunk and 
then select it at the end.

Cheers,
Sarah



More information about the use-livecode mailing list