Re: How a window was closed?
Re: How a window was closed?
- Subject: Re: How a window was closed?
- From: Eric Gorr <email@hidden>
- Date: Fri, 5 Mar 2010 12:16:48 -0500
On Mar 5, 2010, at 11:53 AM, Greg Guerin wrote:
> Eric Gorr wrote:
>
>> In most cases this is the way the code was written. However, for a small number of panels, the design was different and this doesn't work. It was made dependent upon knowing how the window was being closed. At some point, I will be able to go back and change this ancient code, but for now, I needed a way to determine how the window was being closed.
>
>
> Outline:
>
> In applicationWillTerminate:, set a global flag to true. Tell all the wacky panels to close. They see the global flag true, and differentiate this close from user-initiated close.
The use of a global was considered and rejected. But, would likely be reconsidered if -windowShouldClose: does not work as expected.
_______________________________________________
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