On Wed, 24 Oct 2012 22:26:59 +0200, ecir hana said:

>> That restoring state stuff is new in 10.7, not 10.8.  You can test if it
>> is responsible by turning it off in System Preferences > General.
>>
>>
>Yes, it is! When I turn it off (Close windows when quitting an application)
>it works as before. Is it possible to have the same behavior even when a
>user has the restoring state stuff enabled?

Yes.  It's been discussed on this list in the past, and should be in the 
archives.  Basically:

                if ([window respondsToSelector:@selector(setRestorationClass:)] 
&&
                        [window respondsToSelector:@selector(setRestorable:)] &&
                        [window 
respondsToSelector:@selector(invalidateRestorableState)])
                {
                        [window setRestorationClass:Nil];
                        [window setRestorable:NO];
                        [window invalidateRestorableState];
                }

Cheers,

-- 
____________________________________________________________
Sean McBride, B. Eng                 [email protected]
Rogue Research                        www.rogue-research.com 
Mac Software Developer              Montréal, Québec, Canada



_______________________________________________

Cocoa-dev mailing list ([email protected])

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

This email sent to [email protected]

Reply via email to