• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
setKeyEquivalent trouble
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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
  • Prev by Date: Re: how do I save prefs when the app is Force Quit?
  • Next by Date: Re: how do I save prefs when the app is Force Quit?
  • Previous by thread: Re: Building binaries for PowerPC and Intel
  • Next by thread: Re: setKeyEquivalent trouble
  • Index(es):
    • Date
    • Thread