Cmd-A doesn't work from Keyboard in Standalone

Charles Hartman charles.hartman at conncoll.edu
Fri Nov 18 11:21:49 EST 2005


No, that isn't what I get in fact! How curious. I think I constructed  
the test stack exactly as you describe. (I copied-and-pasted your  
field and card scripts.) When I put the insertion point in field 1  
and press cmd-A I get the "DOWN…" and "UP…" outputs, but I do not get  
either the "FIELD…" or the "CARD…" outputs. When I put the insertion  
point outside the fields, cmd-A yields the "CARD…" result (and a  
system alert sound--why?). When I put the insertion point inside  
field 2, all the text in field 2 gets selected.

This is with OS 10.4.3, Rev (Dreamcard) 2.6.1 build 152.

Here's another experiment: Make a simple stack containing a scrolling  
list field and a button called "myCmdAbtn". The script for that button:
		on mouseUp
		    answer "myCmdAbtn got a press"
		end mouseUp
The scrolling-list field's script:
		on commandKeyDown theKey
		    switch (theKey)
		    case "a"
		        pressTheKey
		        break
		    end switch
		end commandKeyDown
The stack script:
		on commandKeyDown theKey
		    switch (theKey)
		    case "a"
		        send mouseUp to btn "myCmdAbtn"
		        break
		    end switch
		end commandKeyDown

On my system, pressing cmd-A when the insertion point is not inside  
the field produces the 'answer' dialog, but pressing cmd-A when the  
insertion point is inside the field selects all the items (default  
'Choice 1', 'Choice 2', 'Choice 3') in the field.

This is why, to get a cmd-A from inside the field to "press the  
button", I found I had to put a rawKeyDown handler in the field's  
script, plus a (mostly redundant) commandKeyDown handler in the stack  
script in case the user happens to have clicked outside the field and  
so put the insertion point outside it.

Am I missing something? Or is there a change between OS X versions?  
Or what?

Confused,
Charles


On Nov 18, 2005, at 10:29 AM, Ken Ray wrote:

> On 11/18/05 7:57 AM, "Charles Hartman"  
> <charles.hartman at conncoll.edu> wrote:
>
>> So commandKeyDown works outside the field, but only rawKeyDown works
>> inside the field.
>>
>> I'd really like to know if I've got something wrong about this.
>
> Charles, that's not what I'm getting... I created a simple stack  
> with two
> fields - the script of field 1 is:
>
> on rawKeyDown pKey
>   put the commandKey into tCmd
>   put "DOWN:" && pKey && tCmd & cr after fld 2
>   pass rawKeyDown
> end rawKeyDown
>
> on rawKeyUp pKey
>   put the commandKey into tCmd
>   put "UP:" && pKey && tCmd & cr after fld 2
>   pass rawKeyUp
> end rawKeyUp
>
> on commandKeyDown pKey
>   put "FIELD Command Down:" && pKey & cr after fld 2
>   pass commandKeyDown
> end commandKeyDown
>
> And the script of the card was:
>
> on commandKeyDown pKey
>   put "CARD Command Down:" && pKey & cr after fld 2
>   pass commandKeyDown
> end commandKeyDown
>
> I put the insertion point into the first field and typed "Command- 
> A" and got
> this in field 2:
>
> DOWN: 97 down
> FIELD Command Down: a
> CARD Command Down: a
> UP: 97 down
>
> This was in Mac OS X 10.3.9; haven't tested it in Windows... are  
> you getting
> the same thing on your end?
>
> Ken Ray
> Sons of Thunder Software
> Web site: http://www.sonsothunder.com/
> Email: kray at sonsothunder.com
>
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your  
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution




More information about the use-livecode mailing list