• 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
toolbar question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.


  • Follow-Ups:
    • Re: toolbar question
      • From: mmalcolm crawford <email@hidden>
  • Prev by Date: Re: unichar for hyperlink?
  • Next by Date: Re: red black trees
  • Previous by thread: Re: Object alloc questions
  • Next by thread: Re: toolbar question
  • Index(es):
    • Date
    • Thread