• 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: Saving Window positions in Cocoa
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Saving Window positions in Cocoa


  • Subject: Re: Saving Window positions in Cocoa
  • From: Vince DeMarco <email@hidden>
  • Date: Thu, 24 Jan 2002 22:54:53 -0800

On Thursday, January 24, 2002, at 06:14 PM, Michael Emfinger wrote:

Hello,

I'm attempting to save the window position on a fixed size window with no
results.

In the window controller Init function I'm calling:
[[self window] setFrameUsingName:@"WindowPosition" force: YES];


..while in the windowWillClose function I'm calling:
[[self window] saveFrameUsingName:@"WindowPosition"];


try setFrameAutosaveName: instead, or in the name: field in the window attribute info panel in IB just set it there.

If window is managed by a NSWindowController then you need to call the windowcontrollers setWindowFrameAutosaveName:


Nothing is being saved though.

I'm aware that autosave name doesn't work unless you re-size a window, but
this one isn't re-sizable anyway and I'm not setting an autosave name in the
nib.


This is a bug, and should get fixed soon.

The code listed here *does* work in one of my apps, but in this particular
case it's not saving anything. Any help on what I might be missing would be
greatly appreciated.

Need more info

vince


References: 
 >Saving Window positions in Cocoa (From: Michael Emfinger <email@hidden>)

  • Prev by Date: Re: setStringValue vs. setTitle on NSButtonCell
  • Next by Date: Re: Saving Window positions in Cocoa
  • Previous by thread: Saving Window positions in Cocoa
  • Next by thread: Re: Saving Window positions in Cocoa
  • Index(es):
    • Date
    • Thread