chasing the focus

Richmond Mathewson richmondmathewson at gmail.com
Tue Jul 5 14:59:28 EDT 2011


On 07/05/2011 09:44 PM, J. Landman Gay wrote:
> On 7/4/11 10:49 PM, Slava Paperno wrote:
>> I'm trying to figure out why a field is losing focus and I don't know 
>> which
>> tools to use for the hunt.
>>
>> At the very end of a mouseUp handler of a button I have this:
>>
>> on mouseUp
>> .....
>>    focus on field "SearchTarget"
>>    put the name of the focusedObject&  cf after msg
>> end mouseUp
>>
>> And I do see [field "SearchTarget"] in the Message box, as expected. But
>> then focus immediately shifts to the card.
>
> If the button has autohilite set to true, it will remove the focus 
> from a field when you click it. As soon as your mouseup handler ends, 
> focus disappears. The fix it to turn off autohilite.
>
I find that when I mislay my spectacles almost everything loses focus; so:

on glassesOn
   set the focus of rightEye to true
   set the focus of leftEye to true
end glassesOn

generally works . . .  :)




More information about the use-livecode mailing list