Re: Disable Lion's window restoration?
Re: Disable Lion's window restoration?
- Subject: Re: Disable Lion's window restoration?
- From: Jean-Daniel Dupas <email@hidden>
- Date: Tue, 26 Jul 2011 12:20:21 +0200
Le 26 juil. 2011 à 02:33, Gerd Knops a écrit :
> Hi,
>
> Is there an application-global way of disabling window restoration?
>
> All I can find is NSWindow's "- (BOOL)isRestorable" method (and it's relatives).
>
> I was hoping for something more global, like a "- (BOOL)shouldRestoreWindows" method in the application delegate protocol or the NSDocumentController class or somewhere.
>
> Thanks
>
> Gerd
The key used by System Preferences to managed this setting is NSQuitAlwaysKeepsWindows, and it is stored in the global user defaults domain.
I think you can override this setting per application by explicitly setting this user default to false in your application.
I don't know if it works, but it may be worth the try.
-- Jean-Daniel
_______________________________________________
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