Re: NSDocumentController, NSDocument and toolbars

2008-07-27 Thread Graham Cox
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

Re: NSDocumentController, NSDocument and toolbars

2008-07-27 Thread John Love
> > Well, what do you want the tool bar item to actually *do*? Whatever it is, > and whatever object is responsible for handling it is your action and > target, respectively. Just like a menu item. > I want it to call NSDocumentController's openDocument: which is the action of the "Open ..." File

Re: NSDocumentController, NSDocument and toolbars

2008-07-27 Thread Graham Cox
On 27 Jul 2008, at 10:02 pm, John Love wrote: I call: [toolbarItem setTarget:self]; [toolbarItem setAction:@selector(openDocument:)]; as Apple specifies. Well, what do you want the tool bar item to actually *do*? Whatever it is, and whatever object is responsible for handling it is your act

NSDocumentController, NSDocument and toolbars

2008-07-27 Thread John Love
I sub-class NSDocument and call it MedDocument. My code is similar to Apple's SimpleToolbar .. the biggest difference is that I create a Category = MedDocument+ToolbarDelegateCategory in order to compartmentalize the code, i.e., keep the toolbar stuff in a separate file. And it works .. except for