Re: close: before NSWindowWillCloseNotification
Re: close: before NSWindowWillCloseNotification
- Subject: Re: close: before NSWindowWillCloseNotification
- From: Jens Alfke <email@hidden>
- Date: Thu, 18 Feb 2010 20:34:07 -0800
On Feb 18, 2010, at 7:47 PM, Charles Burnstagger wrote:
> I need to recieve the notification *before* I receive close: since I want to do some stuff before the window goes away.
What kind of stuff? The window still exists when you get the windowWillClose notification, so you can safely call into it or your views.
If you're talking about interacting with the user (like confirming the close), you should implement the -windowShouldClose: delegate method. This gets called earlier, before the -close call, and by returning NO from it you can prevent the close entirely.
—Jens_______________________________________________
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