• 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
Creating a stand-alone NSToolbar controller
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Creating a stand-alone NSToolbar controller


  • Subject: Creating a stand-alone NSToolbar controller
  • From: David Martin <email@hidden>
  • Date: Fri, 16 Aug 2002 20:33:59 +0200

Hi,

I have a Cocoa Document-based application with a toolbar attached to its document windows. Currently, my NSToolbar delegate methods are located in the main NSDocument subclass. However, since the subclass is also delegate/data source for an NSTableView and for NSComboBoxes, things are starting to get a bit crowded. I would like to isolate my NSToolbar delegate methods in their own controller.

Things are working fine for standard NSToolbarItems, but I have a custom item  a NSTextField and a NSPopUpButton packed in their own Interface Builder CustomView  that doesn't want to get to the toolbar.
Actually, while the outlet to that custom view is alive and well in my controller's -awakeFromNib:, it is null in the -toolbar:itemForItemIdentifier:willBeInsertedIntoToolbar: delegate method and I can't understand why it is so

People who'd like to help may download my test project: <http://www.gwenhiver.net/tmp/NSToolbarTest.tgz>. There are two versions: a working version with the NSToolbar delegate methods *in* the NSDocument subclass, and a non-working version with the NSToolbar delegate methods *out* of the NSDocument subclass.

Thanks for you help,
David
_______________________________________________
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:
    • [newbie] takeValue:forKey memory management
      • From: Jay Prince <email@hidden>
    • Re: Creating a stand-alone NSToolbar controller
      • From: Kevin Callahan <email@hidden>
  • Prev by Date: Overide NSBrowser NSMatrix Question?
  • Next by Date: Re: Creating a stand-alone NSToolbar controller
  • Previous by thread: Overide NSBrowser NSMatrix Question?
  • Next by thread: Re: Creating a stand-alone NSToolbar controller
  • Index(es):
    • Date
    • Thread