Saving Window Frame
Saving Window Frame
- Subject: Saving Window Frame
- From: Tom Gray <email@hidden>
- Date: Thu, 23 Jan 2003 09:19:05 -0500
As always, thanks in advance.
I am having difficulty in getting a NSWindowController subclass to save
its frame from launch to launch. I have managed to confuse myself quite
a bit.
A little background, I have three different NSWindowController window
subclasses (a Terminal, a Preferences window and a Commands window.
In the the Preferences NSWindowController subclass I use have this
line of code in the init:
[self setWindowFrameAutosaveName:@"Preferences"];
and it does indeed save its frame from launch to launch. This subclass
does not implement a windowShouldClose delegate method.
In my Commands NSWindowController subclass (in which I do implement a
windowShouldClose delegate) that
method will not work. Instead I have (in the init when the window has
not yet been loaded) the following command:
[[self window] setFrameUsingName:@"RESWindow"];
and in the windowShouldClose method the following command:
[[self window] saveFrameUsingName:@"RESWindow"];
and this works retaining the window frame from launch to launch.
My problem is in my Terminal NSWindowController subclass neither of
these methods work!
I have checked the pList, the frames are indeed being saved to the
user's prefs.
Can anyone educate me on this?
Tom Gray
-------------
email@hidden
or
email@hidden
_______________________________________________
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.