Re: How to hide a window?
Re: How to hide a window?
- Subject: Re: How to hide a window?
- From: "Erik M. Buck" <email@hidden>
- Date: Thu, 20 Sep 2001 23:06:32 -0500
The document and window controller architecture is relatively recent. We
used to make our own document classes with or without separate window
controllers. There is no magic in any of the classes. Apple has provided
the NSWindowController and NSDocument classes to make life easier. These
classes contain logic common to many applications, but they are not required
for any application. There are no hidden default instances or anything like
that.
Control your windows any way you want. Send messages directly to them if
you want. Do not fear that NSWindowController is doing anything that you
can not do yourself if you want the extra work.
NSApplication, NSWindow, and NSView are basically required for any Cocoa app
with a GUI. IB does not give you the option of NOT having an instance of
NSApplication in a GUI app. NSApplication does hidden and complex things
like talk to the window server and an event loop.
NSDocument, NSDocumentManager, NSWindowController, and most other AppKit
classes are completely optional. They exist only to make your life easier.
If they make life easier, use them. If not, don't.
----- Original Message -----