Re: NSWindow not restoring location
Re: NSWindow not restoring location
- Subject: Re: NSWindow not restoring location
- From: Edwin Zacharias <email@hidden>
- Date: Sat, 15 Jun 2002 10:14:02 -0400
On Friday, June 14, 2002, at 11:34 AM, Shawn Erickson wrote:
On Thursday, June 13, 2002, at 12:50 PM, Ondra Cada wrote:
On Thursday, June 13, 2002, at 08:24 , Edwin Zacharias wrote:
- (void)windowDidMove: (NSNotification *)aNotification
{
[ [ self window ] saveFrameUsingName: @"Inspector" ];
}
This looks superfluous. Is it not in your setup?!?
I think it is... the following method tells the window what its auto
save name is. The key word is auto, every time the window is moved or
resized its default will be updated.
- (void)windowDidLoad
{
[ [ self window ] setFrameAutosaveName: @"Inspector" ];
}
It should be superfluous, but there appears to be a bug in the window
frame autosave code. It saves the frame every time the window resizes,
but not when the window just moves. That's why it doesn't work for
non-resizable windows like most panels.
If I am wrong on this let me know. Perhaps it was fixed in Jaguar?
- Edwin
P.S. I mentioned the reason for windowDidMove in my last email. It
would be nice if you would read it all. Here it is if you don't have it
anymore:
http://cocoa.mamasam.com/COCOADEV/2002/06/1/36607.php
_______________________________________________
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.