• 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
Re: NSDocumentController, NSDocument and toolbars
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


References: 
 >NSDocumentController, NSDocument and toolbars (From: "John Love" <email@hidden>)
 >Re: NSDocumentController, NSDocument and toolbars (From: Graham Cox <email@hidden>)
 >Re: NSDocumentController, NSDocument and toolbars (From: "John Love" <email@hidden>)

  • Prev by Date: Handle errors within NSURLConnection
  • Next by Date: Re: IB not recognizing class hierarchy
  • Previous by thread: Re: NSDocumentController, NSDocument and toolbars
  • Next by thread: Web View silently fails
  • Index(es):
    • Date
    • Thread