Re: Retaining state of windows and panels
Re: Retaining state of windows and panels
- Subject: Re: Retaining state of windows and panels
- From: "Adam R. Maxwell" <email@hidden>
- Date: Sun, 16 Jan 2005 22:16:36 -0800
On Jan 16, 2005, at 21:01, M. Uli Kusterer wrote:
At 15:05 Uhr -0800 16.01.2005, Adam R. Maxwell wrote:
- (void)saveWindowFrame{
[[self window] saveFrameUsingName:@"MyPanel"];
}
- (void)setWindowFrame{
[[self window] setFrameUsingName:@"MyPanel"];
}
Shouldn't that be -(void) saveWindowFrame: (NSNotification*)notif and
-(void) setWindowFrame: (NSNotification*)notif ?
That would be more correct, but it's not the way I named the selectors
when registering for notifications; there are other (better) ways of
doing this, but I didn't have enough of a clue at the time to figure
them out. I just noticed that the panel's delegate isn't set to be the
window controller, so that's probably why I couldn't get the NSWindow
notifications.
Also, I'd avoid a call starting with "set" that isn't an accessor.
loadWindowFrame: or setupWindowFrame: sounds like a better name here
to avoid confusion later.
Right again; I think I was still fuzzy on the idea of accessors at the
time, as well. The main thing at the time was that I was able to save
size/location of my inspector panels, since I couldn't get it working
automatically with Interface Builder.
thanks,
Adam
_______________________________________________
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