Re: Knowing when window closed
Re: Knowing when window closed
- Subject: Re: Knowing when window closed
- From: Nathan Day <email@hidden>
- Date: Tue, 30 Jul 2002 16:07:09 +0930
If you're windows have delegate (WindowController) you can implement the
method
- (void)windowWillClose:(NSNotification *)aNotification
or if for some reason you want to do something after the window is
closed in you windowController you could try overriding the close method.
- (void)close
{
[super close];
// do your stuff here
}
you can also listen for NSWindowWillCloseNotification anywhere in your
app, your notification method will be passed the window that will close,
so you can test it to see if it is the one your interested in or set up
notifications for only the windows you are interested in.
Again if you need to know after closing you could override the close
method in your windowController and then post your own notification.
-
On Wednesday, July 31, 2002, at 06:53 AM, Aidas wrote:
Hi,
I want to know and handle closing of two windows called "first" and
"second". How could I do this? If you can please add example too.
Thank you
Aidas
Nathan Day
http://homepage.mac.com/nathan_day/
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.