FROM : Adrian
DATE : Tue Nov 12 23:26:01 2002
Thanks for the reply. It runs through a normal sequence of events. It
calls performKeyEquivalent: in NSWindow to NSView to NSButton, which
then calls performClick in an NSButtonCell, then sendAction and so
forth. It does this if I had set the key equivalent to any character,
except the arrow keys which are the only ones it calls twice.
I have actually set this up in a little test app and get the same
problems. So no other action items are set. The problem manifests
anyway without holding down the key and it has had it's setContinuous:
set to NO, and it is also off in IB. If I set the key equivalents to
something else, the arrow keys will beep when pressed, as they should
as they don't have any key equivalents set, as any other key would.
I would greatly appreciate any other suggestions. All the best.
Adrian
On Wednesday, November 13, 2002, at 05:12 PM, j o a r wrote:
> Set a breakpoint in the action method and trap it in the debugger, try
> to see if you can find out how it's called when it's triggered.
> Do you have several action items with the same keyboard equivalent?
> For example some menu item? Could this problem be related to the time
> you keep the key pressed? Is the button using continous actions?
>
> j o a r
>
> On Sunday, Nov 10, 2002, at 11:21 Europe/Stockholm, Adrian wrote:
>
>> I have set some of my NSButtons key equivalents to arrow keys like so:
>>
>> unichar left = NSLeftArrowFunctionKey;
>> [_rewind setKeyEquivalent:[NSString stringWithCharacters:&left
>> length:1]];
>>
>> Which works but instead sends 2 action messages. If I set the key
>> equivalents to anything else with this method it works fine and sends
>> the 1 action message as it should.
>>
>> So what am I missing here?
DATE : Tue Nov 12 23:26:01 2002
Thanks for the reply. It runs through a normal sequence of events. It
calls performKeyEquivalent: in NSWindow to NSView to NSButton, which
then calls performClick in an NSButtonCell, then sendAction and so
forth. It does this if I had set the key equivalent to any character,
except the arrow keys which are the only ones it calls twice.
I have actually set this up in a little test app and get the same
problems. So no other action items are set. The problem manifests
anyway without holding down the key and it has had it's setContinuous:
set to NO, and it is also off in IB. If I set the key equivalents to
something else, the arrow keys will beep when pressed, as they should
as they don't have any key equivalents set, as any other key would.
I would greatly appreciate any other suggestions. All the best.
Adrian
On Wednesday, November 13, 2002, at 05:12 PM, j o a r wrote:
> Set a breakpoint in the action method and trap it in the debugger, try
> to see if you can find out how it's called when it's triggered.
> Do you have several action items with the same keyboard equivalent?
> For example some menu item? Could this problem be related to the time
> you keep the key pressed? Is the button using continous actions?
>
> j o a r
>
> On Sunday, Nov 10, 2002, at 11:21 Europe/Stockholm, Adrian wrote:
>
>> I have set some of my NSButtons key equivalents to arrow keys like so:
>>
>> unichar left = NSLeftArrowFunctionKey;
>> [_rewind setKeyEquivalent:[NSString stringWithCharacters:&left
>> length:1]];
>>
>> Which works but instead sends 2 action messages. If I set the key
>> equivalents to anything else with this method it works fine and sends
>> the 1 action message as it should.
>>
>> So what am I missing here?
| Related mails | Author | Date |
|---|---|---|
| Adrian | Nov 10, 02:22 | |
| Adrian | Nov 12, 13:53 | |
| j o a r | Nov 12, 22:13 | |
| Adrian | Nov 12, 23:26 | |
| Bryan Blackburn | Nov 13, 00:29 |






Cocoa mail archive

