> > 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 menu item. I use my override of NSDocument's readFromURL: to do my unique stuff after NSApp's runModal dialog is dismissed. > > openDocument: is a method of NSDocumentController, not NSDocument ... >> *unless* I place this action method within my MedDocument ... and such a >> place is clearly wrong >> > > So maybe set the target to the document controller, not self? > 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)? Only the NSWindowController is passed to the windowControllerDidLoadNib method, not the NSDocumentController? If I can somehow get an instance of NSDocumentController, then I could call: [MyNSDocumentController URLsFromRunningOpenPanel]; which apparently is the 1st thing done within openDocument: Which begs the question .. do I also wish to create a sub-class of NSDocumentController within my mainNib file also and do the Toolbar stuff within there .. don't see how right now, but I have done very little thinking about this possibility. If I seem like I'm grasping at a windmill, that is very accurate. John _______________________________________________ Cocoa-dev mailing list ([email protected]) 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: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to [EMAIL PROTECTED]
