On Feb 7, 2014, at 14:49 , Markus Spoettl <ms_li...@shiftoption.com> wrote:

> But apparently its result is ignored because items that are disallowed (by 
> not returning them in this delegate method) are still visible.

It’s a while since I had to suffer through the pain that is NSToolbar delegate 
methods, but I suspect the problem is that the IB-created items are in a 
different universe from programmatically created ones. Therefore, in a “mixed” 
configuration, ‘toolbarAllowedItemIdentifiers:’ is queried only to supply the 
identifiers of non-IB items that you want to add to the IB-defined toolbar. The 
delegate method is, after all, optional *in this case*.

If that’s correct, and you have a toolbar whose items are allowed in a 
*contextually* dependent way, you’ll have to create the toolbar contents 
programmatically — or at least those items.

Note that I’m speculating. I vaguely recall that there was something very 
horrible about mixing IB and non-IB items, and this may or may not be it.

_______________________________________________

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

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

Reply via email to