Re: Disable Lion's window restoration?
Re: Disable Lion's window restoration?
- Subject: Re: Disable Lion's window restoration?
- From: Gerd Knops <email@hidden>
- Date: Wed, 27 Jul 2011 08:37:56 -0500
On Jul 26, 2011, at 5:20 AM, Jean-Daniel Dupas wrote:
>
> 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.
>
Thanks, that does the trick.
Gerd
_______________________________________________
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