Eric Gorr wrote:

The use of a global was considered and rejected. But, would likely be reconsidered if -windowShouldClose: does not work as expected.


Then add a category method that means "close but preserve open state for next launch", and call that from the termination delegate.

Or a category method that tells the receiver to copy its current open state, which will then be written to disk when the next close message is received.

I don't see a big difference in how the two things (user-close vs. close-but-preserve-opened-state) are distinguished by the panels. Use whatever makes sense for the code base. The key point is that the latter only occurs at app termination. Tying it into app termination is what makes it different.

  -- GG


_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to