Re: Howto issue stopModal to NSApp if the Window is close?
Re: Howto issue stopModal to NSApp if the Window is close?
- Subject: Re: Howto issue stopModal to NSApp if the Window is close?
- From: Nir Soffer <email@hidden>
- Date: Tue, 5 Feb 2008 20:54:13 +0200
On Feb 2, 2008, at 07:50, Devraj Mukherjee wrote:
I have a Window in my Nib file that I run in modal mode using [NSApp
runModalForWindow: aWindow]. By default a button on the Window issues
the [NSApp stopModal] and then the application continues.
However when someone hits the close button the application is still in
Modal mode. Is there a way of hooking onto the "close" action so I can
stop the application running in modal mode after the Window has been
closed.
Set a window delegate and implement -windowWillClose:, aborting the
modal session.
Best Regards,
Nir Soffer
_______________________________________________
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