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 09:23:41 -0500
On Mar 4, 2010, at 6:14 PM, Graham Cox wrote:
>
> On 05/03/2010, at 12:39 AM, Eric Gorr wrote:
>
>> Now, there are other means that will cause the NSPanel to be closed with different answers to whether or not it should be visible at the next launch.
>
>
> It's not clear to me why. You only need to record whether the panel is currently open or closed in the user defaults. If the app quits in the 'open' state it opens the panels at next launch. For recording the closed state, the NSWindowWillCloseNotification looks useful. For open state, there isn't an equivalent notification but its controller should know when this is.
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.
_______________________________________________
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