mouseDown/Up - no actions when not on buttons

Pat Trendler ptrendler at
Thu Feb 10 17:31:16 EST 2005

Sorry Jason, I should also have added to below - not make the button 
invisible, colors & patterns/fill background color purple and just leave the 
mouseup/mousedown in the script.
Not that you need that now in this case.

patrend at

>Turn off showName,autoHilite,sharedHilite, showFocusBorder. And turn off
>traversalOn - so that it doesn't take focus off the field if it is 

You can use property inspector (size & position/layer) to 'send to the back'
alter you create the button.

----- Original Message ----- 
From: "Silver, Jason" <jsilver at>
To: "How to use Revolution" <use-revolution at>
Sent: Friday, February 11, 2005 4:58 AM
Subject: RE: mouseDown/Up - no actions when not on buttons

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
use-revolution mailing list
use-revolution at 

More information about the Use-livecode mailing list