• 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
Error on third opening of preferences window
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: Error on third opening of preferences window
      • From: Markus Spoettl <email@hidden>
  • Prev by Date: Ideas for multi-type inspector design
  • Next by Date: Re: Error on third opening of preferences window
  • Previous by thread: Re: Ideas for multi-type inspector design
  • Next by thread: Re: Error on third opening of preferences window
  • Index(es):
    • Date
    • Thread