Re: setFrameAutosaveName: gone insane
Re: setFrameAutosaveName: gone insane
- Subject: Re: setFrameAutosaveName: gone insane
- From: Edwin Zacharias <email@hidden>
- Date: Tue, 14 May 2002 22:58:46 -0400
John,
You solved half the problem. I implemented a windowDidMove: delegate
for every window and saved the frame myself. It now saves the correct
window position every time.
The problem is, on startup my panel keeps jumping to the top left
anyway. I did some testing, and this only happens when the panel is
partially off screen or near the dock. My dock is on the right side of
the screen, and when I moved the dock to the bottom it could be moved
right next to the dock without a problem.
It seems that the top-left corner is the default position. It would
have been much better to keep the window as close to the original
position as possible. I guess I'll have to write my own implementation.
If anyone want's the code for this, or has done it already, send me an
email.
- Edwin
On Tuesday, May 14, 2002, at 09:29 PM, John Blackburn wrote:
Edwin,
I believe this is a bug in Cocoa. The setting isn't remembered
sometimes unless you also resize the window.
John Blackburn
On Tuesday, May 14, 2002, at 06:13 PM, Edwin Zacharias wrote:
I'm am having an amazing amount of trouble getting NSWindow's
setFrameAutosaveName: to work. A utility window of mine keeps jumping
back to the top-left of the screen and not remembering its position.
I will open the application. Move the window. Quit the application.
And open it again. It should remember the position but it either
doesn't or it moves the window to the top-left of the screen.
Here's my code an NSWindowController subclass:
- (void)windowDidLoad
{
[[self window] setFrameUsingName:@"OLOptionPanel" force:YES];
[[self window] setFrameAutosaveName:@"OLOptionPanel"];
}
The window is a non-resizable utility panel. I think that might be
part of the problem.
Any help would be appreciated. Or if you know of sample code
somewhere that deals with this.
- Edwin
_______________________________________________
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.