On 02/10/2009, at 6:08 AM, I. Savant wrote:

I couldn't find it anywhere in the documentation. But the thing is, it doesn't seem like you can even move a toolbar from one window to another, even properly making sure that it never belongs to more than one at a time, without getting weird drawing errors. I didn't dig too much into that, it's enough to know that it doesn't work. But creating a new one each time DOES work and creates very little additional overhead, as far as I can tell.


Toolbars have always been "special". It seems a lot of "funky things" happen when a window is sent -setToolbar: (even with the shiny new IB 3 toolbar editing support).

I concur. I had a lot of problems when I tried to swap two toolbars that were created with IB. In my case it was a performance problem, it would take about 1.5 seconds to swap the toolbar, pegging the CPU the whole time.

Turned out it was much, much easier to just create a new toolbar instance each time and let the toolbar delegate methods do their work. The toolbar swap is now practically instantaneous.

The IB3 editor is nice for simple toolbars but for more complex stuff I'd tend to avoid it.

--
Rob Keniger



_______________________________________________

Cocoa-dev mailing list ([email protected])

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 [email protected]

Reply via email to