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 action and target, respectively. Just like a menu item.

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?

What I
*do* want to override within MedDocument is: - (BOOL)
readFromURL:(NSURL*)absoluteURL ofType:(NSString*)typeName
error:(NSError**)outError; as one of the few methods which Apple specifies
should be overridden.


Not sure this relates in any way to the toolbar discussion. Does it?

Graham
_______________________________________________

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]

Reply via email to