Error on third opening of preferences window
Error on third opening of preferences window
- Subject: Error on third opening of preferences window
- From: David Hirsch <email@hidden>
- Date: Tue, 15 Dec 2009 11:02:19 -0800
Okay, all: can somebody explain this error to me? The debugger isn't
much help and the problem is not in my code (because I can reproduce
this without writing any code!).
1) Make a new document-based cocoa project in XCode.
2) Open MainMenu.xib in IB, add a new blank window. Set the window to
Not visible on Launch.
3) Hook up the Preferences menu item to makeKeyAndOrderFront of this
new window.
4) Build and run.
5) Upon launch you'll see your document.
6) Open prefs, close it, open it, close it, try to open it again -
EXC_BAD_ACCESS ! (Sometimes I get the error sooner).
The error is happening in [NSMenu _enableItem:].
Is there some other menu item that has to be hooked up to something?
Do I need to do some Info.plist initializing perhaps?
Is makeKeyAndOrderFront an incorrect way to show a window?
The same behavior happens in a non-document-based app.
-Dave
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden