Re: Any way to tell why a window is closing?
Re: Any way to tell why a window is closing?
- Subject: Re: Any way to tell why a window is closing?
- From: Uli Kusterer <email@hidden>
- Date: Mon, 21 Sep 2009 17:28:22 +0200
On 21.09.2009, at 17:15, Scott Ribe wrote:
Within -windowWillClose, I need to know whether or not the user
clicked the
close button on the window.
Please note: this is not for some crazy un-Mac-like UI idea, it is for
debugging purposes.
For debugging, you could probably walk the view hierarchy of your
window (upwards from the content view to its superview etc.) and find
the close button widget. Or actually, I vaguely remember there may be
an API for getting the close button these days.
Once you have the close button, you could change its action to point
to a method of your making, and then from that call the original action.
Cheers,
-- Uli Kusterer
"The witnesses of TeachText are everywhere..."
_______________________________________________
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