Re: Detecting when a panel closes
Re: Detecting when a panel closes
- Subject: Re: Detecting when a panel closes
- From: Henry McGilton <email@hidden>
- Date: Tue, 28 Dec 2004 21:28:57 -0800
On Dec 28, 2004, at 7:08 PM, Chad Armstrong wrote:
What is the recommended way of detecting when a panel (such as an info
panel like in Interface Builder or Photoshop) closes? I want to be
able to detect when a particular panel closes and run some other
operations on it when this happens. Is it possible to run an
NSNotification to detect when a particular panel is closed? Or should
some other methods be used?
NSPanel is a sub-class of NSWindow. Therefore, all the NSWindow
delegate methods can apply. Presumably you have some kind of
controller object that sets and responds to the state of
controls on the panel? Make that controller a delegate of
the panel. Then, you can implement any of the NSWindow
delegate methods, such as windowWillClose and windowShouldClose
and then do whatever appropriate stuff you need to do.
Cheers,
........ Henry
===============================+============================
Henry McGilton, Boulevardier | Trilithon Software
Objective-C/Java Composer | Seroia Research
-------------------------------+----------------------------
mailto:email@hidden | http://www.trilithon.com
|
===============================+============================
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden