• 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
<no subject>
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

<no subject>


  • Subject: <no subject>
  • From: "Tony S. Wu" <email@hidden>
  • Date: Thu, 12 Sep 2002 08:56:08 -0700

In my application's document, I have these two methods:

- (void)windowControllerDidLoadNib:(NSWindowController *) aController
{
[[NSNotificationCenter defaultCenter]
addObserver: self
selector: @selector(windowDidResize:)
name: NSWindowDidResizeNotification
object: window];

[window setFrameUsingName: @"MyDocumentWindow"];

// ...
}

- (void)windowDidResize: (NSNotification *)aNotification
{
[window saveFrameUsingName: @"MyDocumentWindow"];
}

I expected it to store my main window's frame, but it didn't do anything.
I checked the preference file, the frame settings didn't get stored.
And after a couple of more try, my curiosity got the best of me.
I created a new application (doc-based too) with these two methods "only".
Now it works...
Could someone tell me what the problem might be?
Thanks.

Tony S. Wu
email@hidden

"Nope, this world ain't perfect. But at least I know it's not because of
me."
_______________________________________________
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.

  • Follow-Ups:
    • setFrameUsingName , setFrameAutosaveName
      • From: Andreas Mayer <email@hidden>
  • Prev by Date: Re: Inter-Application Communication in Cocoa ?
  • Next by Date: Re: <no subject>
  • Previous by thread: Re: Inter-Application Communication in Cocoa ?
  • Next by thread: setFrameUsingName , setFrameAutosaveName
  • Index(es):
    • Date
    • Thread