Re: "on enterKey" not working

2007-10-14 Thread Kay C Lan
On 10/15/07, Mark Swindell <[EMAIL PROTECTED]> wrote:

Yet, "focus on this cd" in the image script states that the card is
> an invalid object.  How do you remove the focus from all objects on a
> card in one fell swoop, and give it to the card?  Could this be the
> problem?


Whilst 'focus on this cd" might be nice, that's really no different from:

click at "1,1"

as long as at position "1,1" has no control there.

As far as I can see, (and I've probably got it completely wrong) in Paul's
case, after he's finished with any object he wants the focus 'lost' so the
focus goes to the card so that when he presses Enter he can run a script in
a particular button. To me, why not just send the focus straight to that
button?

Rev is already set so that if there is a defaultButton on a card, and
nothing has the focus, pressing Enter or Return is like clicking on the
defaultButton. Which really means that with a card with a defaultButton,
clicking the card doesn't palace the focus on the card but really places it
on the defaultButton.

If a card has no defaultButton and you set it up so that when the card has
focus, pressing Enter or Return activates a particular button, then
shouldn't that button be the defaultButton? It would seem strange to me to
have a card full of buttons, none of which are 'throbbing blue' and yet
pressing Enter will activate one of them. In this case, everywhere you'd
have to have 'click at "1,1" or even focus on card (if that worked), you
could have focus on btn "theOneIWant".

Either I way, I'm sure there should be something here for Paul to get done
what he wants:-)
___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: "on enterKey" not working

2007-10-14 Thread Mark Swindell
Besides clicking on a card background, how do you set the focus of a  
card to the card itself?


If you click on the card, not on any object or background image, the  
focus is removed from all possible suspects/object.  But if you click  
on an image whose traversalOn is true, for example, it retains the  
focus, and the enterKey message is trapped.  If its traversalOn is  
false, then there is no effect and any previously focused objects  
retain their focus.


Yet, "focus on this cd" in the image script states that the card is  
an invalid object.  How do you remove the focus from all objects on a  
card in one fell swoop, and give it to the card?  Could this be the  
problem?


Mark
___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: "on enterKey" not working

2007-10-14 Thread Kay C Lan
On 10/15/07, Paul Gabel <[EMAIL PROTECTED]> wrote:
>
>  The problem isn't default buttons, because I don't have any
> set on the card I'm experimenting on.


Well maybe you should have just 1.

I'm on the verge of abandoning "on enterKey," but if anyone has any
> more suggestions I'd love to hear them. Thank you again.


Here's an option:

In all your fields/buttons, except the one in question, end the script with:

focus on btn "theOneImTryingToFocusOn"

For fields you'll need to handle 'on returnInField', 'on enterInField' and
'on tabKey' to make sure that focus always goes to the button.

Note that this approach may cause confusion if you have multiple fields as
most people expect that once you tab/enter/return out of a field the
Insertion Point will move to the next field.

I checked the above by placing one defaultButton on a card and making it
invisible.  In the couple of fields and buttons on the card I ended their
scripts with the above ' focus on' script. In each case tab/enter/return in
field did what it was suppose to do and then focus was 'lost' - not on or in
any visible object on the card.
Pressing the Enter or Return key would then activate the script in the
invisible defaultButton, which simply beeped and bought a dialog box telling
me the key I'd pressed.

Note that the defaultButton's only contained a 'on mouseUp' script. As noted
before, when a defaultButton has focus and you press Enter or Return a
mouseUp message is sent to the defaultButton.

HTH
___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: "on enterKey" not working

2007-10-14 Thread Sarah Reichelt
> All of this experimenting has led me to conclude that the problem
> involves "focus" and the "focusedObject" function. I have several
> controls on cards that users respond to. If the user (that's me in my
> experiments) enters text in a field or clicks on a radio button,
> these controls get the focus (typing "put the focusedObject" in the
> message box reveals this). But I can't set the focus to "none" (I
> tried), and I can't set the focusedObject to the card, where the "on
> enterKey" script resides (since it's a function, not a property). So
> it seems that after a user responds, some control will always have
> the focus, and, when I press the Enter Key, Rev sends the enterKey
> message to it instead of the card.
>
> I'm on the verge of abandoning "on enterKey," but if anyone has any
> more suggestions I'd love to hear them. Thank you again.
>

Two suggestions for you Paul:

1. Set the traversalOn of all buttons to false. It is used on Windows
where people tab through buttons, but on Macs, this is not needed, but
as you have observed, it does allow buttons to grab the focus.

2. Add an enterInField handler to your card script as well. This
should catch the key press when the focus is in a field.

Cheers,
Sarah
___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: "on enterKey" not working

2007-10-14 Thread Paul Gabel
A big "thank you" to Randy Hengst, Jim Ault, Bjornke von Gierke,  
Sarah Reichelt, and Kay Lan.


Just to update you, I still cannot use "on enterKey" effectively.  
This is the handler I want to place at the card level ...


on enterKey
  click at the loc of btn "Continue"
end enterKey

The problem isn't that I can't tell the Enter Key from the Return  
Key, as was suggested (I've been using a Mac since 1984). The problem  
isn't lockMessages, since it's reset to false at the end of each  
handler. The problem isn't default buttons, because I don't have any  
set on the card I'm experimenting on.


I commented out every "on enterKey" in my 3 stacks and put Jim's  
suggestion ...


on enterkey
  answer "you are in the stack script, and a bit too far into the  
heirarchy"

end enterkey

... in my mainstack. It brings up the answer dialog box all right.

All of this experimenting has led me to conclude that the problem  
involves "focus" and the "focusedObject" function. I have several  
controls on cards that users respond to. If the user (that's me in my  
experiments) enters text in a field or clicks on a radio button,  
these controls get the focus (typing "put the focusedObject" in the  
message box reveals this). But I can't set the focus to "none" (I  
tried), and I can't set the focusedObject to the card, where the "on  
enterKey" script resides (since it's a function, not a property). So  
it seems that after a user responds, some control will always have  
the focus, and, when I press the Enter Key, Rev sends the enterKey  
message to it instead of the card.


I'm on the verge of abandoning "on enterKey," but if anyone has any  
more suggestions I'd love to hear them. Thank you again.


Paul Gabel

___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: "on enterKey" not working

2007-10-13 Thread Jim Ault
put in the stack script

on enterkey
  answer "you are in the stack script, and a bit too far into the heirarchy"
end enterkey

This should not be triggered if the trapping handler is working.

Jim Ault
Las Vegas


On 10/13/07 6:13 PM, "Kay C Lan" <[EMAIL PROTECTED]> wrote:

> On 10/14/07, Paul Gabel <[EMAIL PROTECTED]> wrote:
> 
> The docs say: The message is sent to the active
>> (focused) control, or to the current card if no control is focused.
>> But there is no focus on any control, and there is no text field
>> active.  When I hit the enter key, nothing happens ‹ there is no
>> beep, and there is no effect on the button "Continue." Am I missing
>> something embarrassingly obvious?
>> 
>> Is there another 'default' button on the card? The docs also say:
> 
> When the user presses Enter or Return and there is no active control,
> Revolution sends a mouseUp message to the defaultButton.
> 
> I don't know what happens if you press Enter and there is more than one
> 'default' button (throbbing blue) but the docs say that:
> 
> If more than one button's default is true, the defaultButton property
> reports the ID of the button whose default property was set to true most
> recently.
> 
> So maybe if you press Enter, mouseUp is sent to the last default button
> created, which in your case may not be Continue. I don't know I haven't
> tested.
> 


___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: "on enterKey" not working

2007-10-13 Thread Kay C Lan
On 10/14/07, Paul Gabel <[EMAIL PROTECTED]> wrote:

The docs say: The message is sent to the active
> (focused) control, or to the current card if no control is focused.
> But there is no focus on any control, and there is no text field
> active.  When I hit the enter key, nothing happens — there is no
> beep, and there is no effect on the button "Continue." Am I missing
> something embarrassingly obvious?
>
> Is there another 'default' button on the card? The docs also say:

When the user presses Enter or Return and there is no active control,
Revolution sends a mouseUp message to the defaultButton.

I don't know what happens if you press Enter and there is more than one
'default' button (throbbing blue) but the docs say that:

If more than one button's default is true, the defaultButton property
reports the ID of the button whose default property was set to true most
recently.

So maybe if you press Enter, mouseUp is sent to the last default button
created, which in your case may not be Continue. I don't know I haven't
tested.

HTH
___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: "on enterKey" not working

2007-10-13 Thread Björnke von Gierke


On 14 Oct 2007, at 00:51, Paul Gabel wrote:


Hi Sarah:

Thanks for your reply. Yes, I pressed Enter (and not Return). And I 
know those 2 lines duplicate each other.


Maybe that is the problem, as they don't.

Return is the key next to the chars. Enter on the other hand is the key 
that is part of the numpad. Of course this difference can be further 
confused by some keyboards having "enter" written on the return key (I 
even saw "return" on a enter key once).


On my iBook, the enter key is situated on the left of my spacebar, and 
has a upwards arrow with a horizontal line above it as icon.


Also, both the returnkey and enterkey messages work flawlessly for me. 
If this is not the actual problem, maybe you have locked messages? 
(Click the envelope with the lock in the iconbar of rev, or check out 
the lockMessages property).


--

official ChatRev page:
http://chatrev.bjoernke.com

Chat with other RunRev developers:
go stack URL "http://homepage.mac.com/bvg/chatrev1.3.rev";

___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: "on enterKey" not working

2007-10-13 Thread Paul Gabel

Hi Sarah:

Thanks for your reply. Yes, I pressed Enter (and not Return). And I  
know those 2 lines duplicate each other. I was just trying to see if  
ANYTHING would respond. (And my keyboard doesn't seem to be broken.)  
The simple situation seems to be that "on enterKey" is not receiving  
the "pressing the Enter key message." Can you think of any other  
suggestions?


Paul Gabel


On Oct 13, 2007, at 2:52 PM, Sarah Reichelt wrote:

Do any of you know why I get no response from the "on enterKey"
handler? The following handler is on the card where the button
"Continue" resides. The docs say: The message is sent to the active
(focused) control, or to the current card if no control is focused.
But there is no focus on any control, and there is no text field
active.  When I hit the enter key, nothing happens — there is no
beep, and there is no effect on the button "Continue." Am I missing
something embarrassingly obvious?

on enterKey
   beep
   send mouseUp to btn "Continue"
   click at the loc of btn "Continue"
end enterKey


I just tested your script Paul, and it works perfectly for me. Are you
sure you are pressing Enter and not Return?

BTW, as written, your script will run the Continue button's mouseUp
script twice.

Cheers,
Sarah
___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your  
subscription preferences:

http://lists.runrev.com/mailman/listinfo/use-revolution


___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: "on enterKey" not working

2007-10-13 Thread Sarah Reichelt
> Do any of you know why I get no response from the "on enterKey"
> handler? The following handler is on the card where the button
> "Continue" resides. The docs say: The message is sent to the active
> (focused) control, or to the current card if no control is focused.
> But there is no focus on any control, and there is no text field
> active.  When I hit the enter key, nothing happens — there is no
> beep, and there is no effect on the button "Continue." Am I missing
> something embarrassingly obvious?
>
> on enterKey
>beep
>send mouseUp to btn "Continue"
>click at the loc of btn "Continue"
> end enterKey

I just tested your script Paul, and it works perfectly for me. Are you
sure you are pressing Enter and not Return?

BTW, as written, your script will run the Continue button's mouseUp
script twice.

Cheers,
Sarah
___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


"on enterKey" not working

2007-10-13 Thread Paul Gabel

Hello everybody:

Do any of you know why I get no response from the "on enterKey"  
handler? The following handler is on the card where the button  
"Continue" resides. The docs say: The message is sent to the active  
(focused) control, or to the current card if no control is focused.   
But there is no focus on any control, and there is no text field  
active.  When I hit the enter key, nothing happens — there is no  
beep, and there is no effect on the button "Continue." Am I missing  
something embarrassingly obvious?


on enterKey
  beep
  send mouseUp to btn "Continue"
  click at the loc of btn "Continue"  
end enterKey

Thank you. Paul Gabel

Rev Studio 2.8.1
Mac OS X 10.4.10
iMac Intel

___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution