• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: NSWindow remember whether showing on re-launch
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSWindow remember whether showing on re-launch


  • Subject: Re: NSWindow remember whether showing on re-launch
  • From: Michael Babin <email@hidden>
  • Date: Sat, 08 Feb 2014 09:45:42 -0600

On Feb 7, 2014, at 11:43 PM, Roland King <email@hidden> 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

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 (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


  • Follow-Ups:
    • Re: NSWindow remember whether showing on re-launch
      • From: Michael Babin <email@hidden>
References: 
 >NSWindow remember whether showing on re-launch (From: Roland King <email@hidden>)

  • Prev by Date: Re: Can I Hide / Show an NSTextField / NSSecureTextField in Cocoa?
  • Next by Date: Re: NSWindow remember whether showing on re-launch
  • Previous by thread: NSWindow remember whether showing on re-launch
  • Next by thread: Re: NSWindow remember whether showing on re-launch
  • Index(es):
    • Date
    • Thread