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

Re: Creating a stand-alone NSToolbar controller


  • Subject: Re: Creating a stand-alone NSToolbar controller
  • From: Kevin Callahan <email@hidden>
  • Date: Fri, 16 Aug 2002 11:42:25 -0700

One way might be to write a category on your class that handles your toolbar methods. You could do the same for your datasource.

Kevin


On Friday, August 16, 2002, at 11:33 AM, David Martin wrote:

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.
_______________________________________________
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.

References: 
 >Creating a stand-alone NSToolbar controller (From: David Martin <email@hidden>)

  • Prev by Date: Creating a stand-alone NSToolbar controller
  • Next by Date: Fwd: Strange problem with NSTextView (was NSTextView colors & styles)
  • Previous by thread: Creating a stand-alone NSToolbar controller
  • Next by thread: [newbie] takeValue:forKey memory management
  • Index(es):
    • Date
    • Thread