text selection question

Jon jbondy at sover.net
Sun Jun 12 07:55:23 EDT 2005


Are all of these [reasonable] timing issues documented somewhere?  I 
just had a similar problem ... er ... situation regarding On Startup vs 
On OpenStack

:)

Jon


Jeanne A. E. DeVoto wrote:

> At 1:16 PM -0400 6/11/2005, Bill Humphrey wrote:
>
>>>> If the command select or focus on is run from and open fld or in 
>>>> the message box then the selection just flashes for a second. If it 
>>>> is run from a button on the card then it works as expected. version 
>>>> 2.6 - what am I doing wrong?
>>>
>>
>> I would not have expected a simple "on open field" to have something 
>> else happen after that changes the focus. I wonder what it is so I 
>> can stop it?
>
>
> Well, openField changes the focus sort of by definition.
>
> If you want a word auto-selected, you'll need to delay the selection 
> until after openField is finished. Try this:
>
>  on openField
>   if target is not empty then send doSelect to me in 1 tick
> end openField
>
> on doSelect
>   select word 1 of me
> end doSelect



More information about the use-livecode mailing list