• 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 Frame (auto) save
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSWindow Frame (auto) save


  • Subject: Re: NSWindow Frame (auto) save
  • From: Pete Yandell <email@hidden>
  • Date: Sat, 27 Mar 2004 21:59:18 +1100

In your awakeFromNib just do:

if (![myWindow setFrameUsingName:@"myFrameName"]) [myWindow center];

This works happily with the auto save name set for the window in
interface builder.

Pete Yandell
http://pete.yandell.com/

On 27/03/2004, at 8:39 PM, Marten van Gelderen wrote:

> Hello,
>
> Is there an elegant way, other than hard looking in the userDefaults
> for the existence of a key: @"NSWindow Frame <some window name>" to
> see if the window frame has ever been saved before? I would like to
> center the window if it comes up first out of a clean install of my
> app and later comply to user movements of the window.
>
> I now have #define-d a NSString that has the "NSWindow Frame <my
> window_name>" hard coded into the string.
> --
> Groeten, Marten
> _______________________________________________
> cocoa-dev mailing list | email@hidden
> Help/Unsubscribe/Archives:
> http://www.lists.apple.com/mailman/listinfo/cocoa-dev
> Do not post admin requests to the list. They will be ignored.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.


References: 
 >NSWindow Frame (auto) save (From: Marten van Gelderen <email@hidden>)

  • Prev by Date: Please help - Re: Urgent Help - How to update HTTP/HTTPS proxy settings programmitically using SystemConfiguration framework??
  • Next by Date: Array Sizes (was Re: List of User Accounts)
  • Previous by thread: NSWindow Frame (auto) save
  • Next by thread: NSImage in NSTableView
  • Index(es):
    • Date
    • Thread