toolbar question
toolbar question
- Subject: toolbar question
- From: email@hidden
- Date: Wed, 25 Feb 2004 17:21:29 EST
I was going over the Apple Toolbar tutorial/sample and it has the following
procedure in the "Controller.m" file
_______________________________________________
- (void) toolbarWillAddItem: (NSNotification *) notif
{
NSToolbarItem *addedItem = [[notif userInfo] objectForKey: @"item"];
// Is this the printing toolbar item? If so, then we want to redirect
it's action to ourselves
// so we can handle the printing properly; hence, we give it a new target.
if ([[addedItem itemIdentifier] isEqual: NSToolbarPrintItemIdentifier])
{
[addedItem setToolTip: @"Print your document"];
[addedItem setTarget: self];
}
}
_______________________________________________
I've searched for all references of "toolbarWillAddItem" but I can't find
where (other than the routine itself) it's being referenced or called, how can it
be used if it is never called?
Does this mean that if I add this routine to any source code it will show the
printer in the tool bar without doing any additional coding?
_______________________________________________
Dale
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.