Re: Document App: IB connections 101
Re: Document App: IB connections 101
- Subject: Re: Document App: IB connections 101
- From: Charles Srstka <email@hidden>
- Date: Wed, 24 Jul 2002 12:25:34 -0500
On Wednesday, July 24, 2002, at 07:41 AM, jerome LAURENS wrote:
Le mardi 23 juillet 2002, ` 09:28 PM, Ondra Cada a icrit :
On Tuesday, July 23, 2002, at 05:40 , Michael Willhide wrote:
Interesting. The document framework uses a separate nib file for the
document class. So you're saying to create an instance of the tool
manager in the nib file for the document, as well as in the
application nib file, make the appropriate connections in each of the
files.. and then implement initWithCoder: such that it returns the
same instance in both cases?
That would be possible, but I would discommend that (unless, of
course, you are *very* sure that is the precise solution you need).
The standard mechanisms (like responder chain, notifications, etc)
should be sufficient for vast majority of cases, without such tricks.
this trick (or an equivalent) is used by the AppKit with the Font
Manager, why should it be avoided?
Not just the Font Manager - this is used all over the AppKit and
Foundation.
[NSApplication sharedApplicaton] (NSApp is a shortcut for this)
[NSFileManager defaultManager]
[NSUserDefaults sharedUserDefaults]
[NSDocumentController sharedDocumentController]
[NSHelpManager sharedHelpManager]
[NSNotificationCenter defaultCenter]
are just a few. There's absolutely nothing wrong with accessing shared
objects this way; else, Cocoa/NeXTSTEP would be very badly designed
indeed.
_______________________________________________
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.