On Feb 9, 2009, at 7:13 PM, Steve Cronin wrote:

Folks;

I have a mix of view and image based toolbar items.
The views are all IBOutlets defined in IB.
Everything is working well - events are handled and items arevalidated, everything is dandy.

Except when the user customizes the toolbar.

The image based items can be added and removed 'till the cows come home
BUT the view based items   -  not so much...
They can be added and then they can be removed.
But once they are removed they cannot be re-added unless the application is quit and restarted. Attempting to re-add a view-based toolbar item that has been removed causes a message like the following: " -[NSSearchField retain]: message sent to deallocated instance 0x19b83490 "


Sooo what is the correct way to handle this?
I guess I'm puzzled by the IBOutlet aspect..

Hi Steve,

Make sure that your implementation of toolbar:itemForItemIdentifier:willBeInsertedIntoToolbar: returns a toolbar item with a "fresh" view each time. That should take care of this problem.

-Peter

_______________________________________________

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