On Jan 21, 2011, at 2:27 PM, Quincey Morris wrote: > On Jan 21, 2011, at 10:48, Luc Van Bogaert wrote: > >> Instead of using a local pointer variable in the action method to open the >> window, I thought about using an instance variable in my app delegate to >> hold a pointer to the windowcontroller object, and check its existance >> before opening the window. However, trying this failed, as now I can open >> and close the window just once, and the app crashes on subsequent attempts >> to open the window. > > Your approach is correct, so you have a bug in your implementation -- most > likely a memory management error. You need to track this down like any other > (likely) overrelease problem. If you post backtraces from the crash and/or > relevant source, I'm sure people will be happy to help isolate what's gone > wrong. Check your settings for the window in Interface Builder... don't change the defaults for Behavior : Release when closed (YES) Memory : Deferred (YES) Buffered
...unless you really know why you are changing them... you can get this crashing behavior with have fiddled with these..._______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) 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: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com