On Feb 8, 2014, at 9:45 AM, Michael Babin <mba...@orderndev.com> wrote:
> On Feb 7, 2014, at 11:43 PM, Roland King <r...@rols.org> wrote: > >> I have a window in my OSX application which shows a log of commands. It's >> not 'Visible At Launch' because you often don't need to see it. It's also >> excluded from the windows menu, instead it has its own permanent menu item >> on that menu which both shows if it's enabled and acts as a menu item to >> toggle it. All works fine. >> >> I want however the window to remember its state and if it was showing when >> the app was terminated, show on re-start. I can do that with a user default >> quite easily but figured this has to be a very common task and thought there >> must be a standard way to accomplish it. Is there? > > Have you read the section of the Mac App Programming Guide on UI preservation? > > User Interface Preservation Well, that looked like a link when I pasted it in my original message but apparently did not get included or sent as such. Here it is again: https://developer.apple.com/library/mac/documentation/General/Conceptual/MOSXAppProgrammingGuide/CoreAppDesign/CoreAppDesign.html#//apple_ref/doc/uid/TP40010543-CH3-SW26 > > Also see the related reference items (NSWindowRestoration protocol, NSWindow > and NSResponder classes). For standard window state (size, position, > visible), I suspect the state preservation/restoration of NSWindow itself > would suffice (as long as the window is restorable). _______________________________________________ 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: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com