Creating a stand-alone NSToolbar controller
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.