• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Retaining state of windows and panels
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


References: 
 >Re: Retaining state of windows and panels (From: Stéphane Sudre <email@hidden>)
 >Re: Retaining state of windows and panels (From: "Adam R. Maxwell" <email@hidden>)
 >Re: Retaining state of windows and panels (From: "M. Uli Kusterer" <email@hidden>)

  • Prev by Date: List of NSPoints/NSRect etc...
  • Next by Date: 1.45 x 1 = 1.450000047683716 ? :: CurrencyConverter
  • Previous by thread: Re: Retaining state of windows and panels
  • Next by thread: NSData testing for NULL
  • Index(es):
    • Date
    • Thread