mouseDown/Up - no actions when not on buttons

Silver, Jason jsilver at
Thu Feb 10 13:58:40 EST 2005

Even without storing the selectedField into a local variable, I was
still getting errors when clicking on the stack.  The problems persisted
even when there was an invisible button behind the "normal" buttons.  I
think the best way to prevent errors is the following method:

Store the current location of the cursor in a local variable for the
For all buttons that depend on the selectedField being in an text box,
run a function to return the name of the selectedField.
If empty is returned, then we know we're not in "User ID" or "Password"
anymore.  Restore the previous known location from the variable, and go

I have yet another question (actually one that my boss would like me to
pose to the mailing list), but I think I'll start it in a new topic, as
it has nothing to do with buttons.  :)

All the best,

-----Original Message-----
From: use-revolution-bounces at
[mailto:use-revolution-bounces at] On Behalf Of Pat
Sent: Wednesday, February 09, 2005 5:50 PM
To: jacque at; How to use Revolution
Subject: Re: mouseDown/Up - no actions when not on buttons

J Landman Gay wrote:

> Instead of trying to get the name for all cases, change the syntax to:
> case navUp
>     -- Determine which text field the user was in
>     if the selectedField contains "User ID" then -- change this
>       focus on field "Password"

The above is always empty. If you use:

> put the short name of the selectedField into activeField
>   if activeField = "User ID" then

as Jason did, you can store the selectedField.

Of course, the rest of your recommendations are a far better way of

patrend at

More information about the use-livecode mailing list