Re: Responder chain messed up after window close...
Re: Responder chain messed up after window close...
- Subject: Re: Responder chain messed up after window close...
- From: Jim Correia <email@hidden>
- Date: Sat, 18 Aug 2007 11:50:44 -0400
On Aug 18, 2007, at 11:35 AM, Thomas Engelmeier wrote:
I added an splash screen (_startupWindow) to my application.
In awakeFromNib: it's controller calls
[NSApp beginModalSessionForWindow:_startupWindow];
and when an dismiss button is pressed,
[NSApp stopModal];
[_startupWindow orderOut:self];
[_startupWindow close]; // causes - an intended - an release of
_startupWindow
If I select any menu, the menu handler accesses the released window
instance (as of NSZombieEnabled, and commenting out [_startupWindow
close]).
What step to remove the window from the responder chain am I missing?
-beginModalSessionForWindow: needs to be paired with -endModalSession:
<http://developer.apple.com/documentation/Cocoa/Reference/
ApplicationKit/Classes/NSApplication_Class/Reference/Reference.html#//
apple_ref/occ/instm/NSApplication/beginModalSessionForWindow:>
Jim
_______________________________________________
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