Re: Saving Window positions in Cocoa
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