mouseDown/Up - no actions when not on buttons

Pat Trendler ptrendler at bigpond.com
Thu Feb 10 16:31:16 CST 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.

Pat
patrend at bigpond.com

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

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 qualcomm.com>
To: "How to use Revolution" <use-revolution at lists.runrev.com>
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
card.
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
there.

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,
Jason

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

J Landman Gay wrote:

snip
> 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"

Jaqueline,
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
coding.

Pat
patrend at bigpond.com
_______________________________________________
use-revolution mailing list
use-revolution at lists.runrev.com
http://lists.runrev.com/mailman/listinfo/use-revolution 



More information about the use-livecode mailing list