closeField
J. Landman Gay
jacque at hyperactivesw.com
Tue Nov 16 14:33:27 EST 2004
On 11/16/04 10:58 AM, Mark Wieder wrote:
> All-
>
> I'm trying to see when a field's contents have changed by using a
> closeField handler, but the message never seems to be issued. Any idea
> why this might be? I know there's a note about the MacOS platform and
> buttons in the documentation, but this situation a) occurs on Windows,
> OS9, and OSX (haven't fired up the linux box for this yet); and b) is
> the same if I switch to a different field.
>
> Alternately, is there a better way to see if a field's contents have
> changed? I've currently switched to checking for rawKeyUp and setting
> a semaphore, but it's ugly and results in false positives if someone
> merely clicks in the field without changing anything.
>
There's this little glitch that has bitten me more than once: the
closefield message isn't always sent if you remove focus from a field by
clicking a button. To get the closefield message, you have to click on
the card to remove the focus first, then click the button.
I had to script a line in my buttons to send an artificial closefield
message to the field. This wouldn't work for you if you really need
closefield to only trigger when a field has changed.
I think if you set the autohilite of all buttons to false, you'll get
the normal messaging behavior; it is only when autohilite is true that
the button ignores a change in focus and the field messages aren't sent.
--
Jacqueline Landman Gay | jacque at hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
More information about the use-livecode
mailing list