• 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
Re: close: before NSWindowWillCloseNotification
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

References: 
 >close: before NSWindowWillCloseNotification (From: Charles Burnstagger <email@hidden>)

  • Prev by Date: Re: Implementing Ken-burns Effect
  • Next by Date: How to detect if mouse on border of view
  • Previous by thread: close: before NSWindowWillCloseNotification
  • Next by thread: How to detect if mouse on border of view
  • Index(es):
    • Date
    • Thread