setKeyEquivalent trouble
setKeyEquivalent trouble
- Subject: setKeyEquivalent trouble
- From: Paolo Bertani <email@hidden>
- Date: Sun, 14 May 2006 21:58:13 +0200
Hi,
in an NSPanel I have 2 standard buttons, one of them is the
"default" button with "return" as key equivalent.
If some user action take place I need the other button to be the
default one.
So I call
[buttonA setKeyEquivalent:@""]; // this is the old button that was
default
[buttonB setKeyEquivalent:@"\r"]; // this is the button becoming the
default one
buttonA becomes not-default but buttonB doesn't become default.
I can force the whole thing to work if I add
[myPanel close];
[myPanelController showWindow:self];
but this is a hack of course.
What I'm missing?
Thanks in advance,
Paolo.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden