Re: NSToolbar delegate -toolbarAllowedItemIdentifiers:
Re: NSToolbar delegate -toolbarAllowedItemIdentifiers:
- Subject: Re: NSToolbar delegate -toolbarAllowedItemIdentifiers:
- From: Quincey Morris <email@hidden>
- Date: Fri, 07 Feb 2014 15:25:18 -0800
On Feb 7, 2014, at 14:49 , Markus Spoettl <email@hidden> 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 (email@hidden)
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:
This email sent to email@hidden