• 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
Fwd: windowcontroller neccessary?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Fwd: windowcontroller neccessary?


  • Subject: Fwd: windowcontroller neccessary?
  • From: daniel oberhoff <email@hidden>
  • Date: Mon, 13 Jan 2003 20:45:21 +0100

ok, thanks! i think things are clearer now. but what do you mean with leaking? wont the principal NSApplication deallocate recources used by the main nib-file (or similarly wont the NSDocument subclass deallocate the documents nib-files resources)?

daniel

Anfang der weitergeleiteten E-Mail:

Von: Mike Ferris <email@hidden>
Datum: Sam, 11. Jan 2003 19:53:07 Europe/Zurich
An: daniel oberhoff <email@hidden>
Cc: cocoa-dev <email@hidden>
Betreff: Re: windowcontroller neccessary?

An NSWindowController gives you some nice nib-management features. For example, an NSWindowController knows about all the top-level objects in the nib it loads and it will release them when it goes away. Without this you have to be sure to create outlets to all the top-level objects and release them yourself or you'll leak.

The NSWindowController for a window does not have to be the window's delegate. A window can have both a windowController and a delegate. It is often the case that people make their windowControllers be the window's delegate as well, however.

You do not have to have an NSWindowController, and if you do have one it can be a subclass or just a plain NSWindowController (although usually it is a subclass).

If you are using NSDocument then the document windows will always have a windowController. For non-document windows, you can do what you like, but NSWindowController is a really good class to start with for your File's Owner.

Mike
_______________________________________________
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.

  • Prev by Date: Re: positioning items in a drawer
  • Next by Date: WebCore and PDF
  • Previous by thread: Re: windowcontroller neccessary?
  • Next by thread: Fwd: windowcontroller neccessary?
  • Index(es):
    • Date
    • Thread