I'm having trouble setting up a custom toolbar item. It looks like it should work and appears in IB OK but doesn't come up correctly at runtime. I must be doing something wrong:

The toolbar item consists of a pair of NSTextFields and some labels. They must be grouped together as a single toolbar item so I have created a custom view that holds the items. I can drag the custom view into the toolbar items panel in IB and they appear there OK. I can hook up the fields to my controller.

At runtime I only see the toolbar item label and not the text fields or other labels. I can drag the item to the toolbar but it still just shows the label.

When my controller tries to set one of the field's values I get either a EXC_BAD_ACCESS, or an exception that NSData doesn't implement - setFloatValue:, but at awakeFromNib time I can see the text field outlets are set and are indeed NSTextFields. By the time the method is called to update the fields (a notification callback), the outlets have the same addresses but they point to garbage.

The controller isn't referenced from any other object in the nib, but that should be OK, right? Not using garbage collection.

Any ideas?

--Graham


_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to