Problem with NSWindow WindowFrameAutosaveName
Problem with NSWindow WindowFrameAutosaveName
- Subject: Problem with NSWindow WindowFrameAutosaveName
- From: Michael Heinz <email@hidden>
- Date: Tue, 9 Nov 2004 11:16:48 -0500
So, I have a document based application that uses WindowFrameAutosaveName.
My first problem was that setting the auto save name in the NIB file for the window didn't do anything, so I added a few lines to my document controller class:
- (id) initWithWindowNibName:(NSString *)nibName {
if (self = [super initWithWindowNibName:nibName]) {
[self setWindowFrameAutosaveName:@"DocumentWindow"];
}
return self;
}
Now the
first document I load will get a window in the same place and size as the last document was when I quit the application. But all later documents end up with windows that have the default place and size.
What am I doing wrong? Running in the debugger, I can see that the init method is getting called for every document, and the autosave name is getting set as well. So what's going on?
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden