• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: NSToolbar delegate -toolbarAllowedItemIdentifiers:
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: NSToolbar delegate -toolbarAllowedItemIdentifiers:
      • From: Markus Spoettl <email@hidden>
References: 
 >NSToolbar delegate -toolbarAllowedItemIdentifiers not getting called, other delegate methods are (From: Markus Spoettl <email@hidden>)
 >Re: NSToolbar delegate -toolbarAllowedItemIdentifiers not getting called, other delegate methods are (From: Markus Spoettl <email@hidden>)
 >Re: NSToolbar delegate -toolbarAllowedItemIdentifiers: (From: Jerry Krinock <email@hidden>)
 >Re: NSToolbar delegate -toolbarAllowedItemIdentifiers: (From: Markus Spoettl <email@hidden>)

  • Prev by Date: Re: NSToolbar delegate -toolbarAllowedItemIdentifiers:
  • Next by Date: Re: [NSPointerArray copy] problem
  • Previous by thread: Re: NSToolbar delegate -toolbarAllowedItemIdentifiers:
  • Next by thread: Re: NSToolbar delegate -toolbarAllowedItemIdentifiers:
  • Index(es):
    • Date
    • Thread