Re: NSDocumentController, NSDocument and toolbars
Re: NSDocumentController, NSDocument and toolbars
- Subject: Re: NSDocumentController, NSDocument and toolbars
- From: Graham Cox <email@hidden>
- Date: Mon, 28 Jul 2008 10:20:44 +1000
On 28 Jul 2008, at 5:05 am, John Love wrote:
Absolutely . So in my sub-class of NSDocument, I call my own
customized Toolbar routine(s) within my override of -
windowControllerDidLoadNib. Just how do I pass an instance of
NSDocumentController to these Toolbar routine(s)?
There is only one NSDocumentController; it's a singleton. You can
obtain it simply using [NSDocumentController sharedDocumentController];
Which begs the question .. do I also wish to create a sub-class of
NSDocumentController within my mainNib file
No, absolutely not. NSDocumentController is one of those classes, like
NSApplication, when there is almost never a need to subclass it unless
you are doing something extremely unusual, which you are not.
hth,
Graham
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden