When has a field changed?
Keith (Gulf Breeze Ortho Lab)
keith at gulfbreezeortholab.com
Tue Oct 25 20:30:35 EDT 2011
Hi All,
Was following this thread and tried the instructions (see below), just for
the fun of it, and it worked fine. I set a "bogus" field so that it was not
visible, then simply set the focus to this hidden field upon mouseUp. Works
like a charm and activates the closeField of the desired field...
Cheers,
- Boo
-----Original Message-----
From: Bob Sneidar
Sent: Tuesday, October 25, 2011 7:08 PM
To: How to use LiveCode
Subject: Re: When has a field changed?
Actually, the workaround I was thinking of trapped mouseUp in the card or
stack handler, then used the command focus on nothing. This will force the
loss of focus by the field thereby forcing a closeField to be sent to the
field that lost the focus.
This way you can use closeField in fields, and still trap for those
mouseups. Just be sure to pass mouseUp in all of your button handlers and
you are good to go!
Bob
On Oct 25, 2011, at 4:24 PM, James Hurley wrote:
> Thanks all for the info about the effect of closeField.
>
> I have assumed that it was called only when a field is closed.
>
> As you point out it is also called when the field loses focus.
>
> It appears that that will happen when one clicks in another field or on
> the card, BUT not when one immediately clicks on another button.
>
> That would be a problem in my application. The user could change the field
> and then immediately click a button, a button that will not see the effect
> of the chance in the field.
>
> My tortured script at least sends the "change" message as soon as the
> mouse leave the field.
>
> Jim
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
_______________________________________________
use-livecode mailing list
use-livecode at lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
More information about the use-livecode
mailing list