• 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: Jerry Krinock <email@hidden>
  • Date: Fri, 07 Feb 2014 14:19:45 -0800

I’ve never used -toolbarAllowedItemIdentifiers:.  However, its documentation states…

"Sent to discover the allowed item identifiers for a toolbar.”

Wonderful :))  There is no indication of who sends it, when, nor what is done with the result.  The “Discussion” is no more enlightening either.  Therefore I have no idea what the purpose of this method is.  Apparently, based on your results, its purpose is not your purpose.

On 2014 Feb 07, at 13:43, Markus Spoettl <email@hidden> wrote:

> So the question is: How do I remove an item with a given identifier in such a way that it does not appear

Here is how I remove toolbar items that are present in nibs…

NSInteger someToolbarItemIndex = [[toolbar items] indexOfObject:someToolbarItem] ;
if ((someToolbarItemIndex >= 0 ) && (someToolbarItemIndex < [[toolbar items] count]))
{
    [toolbar removeItemAtIndex:settingsToolbarItemIndex] ;
}

where ‘toolbar’ and ‘someToolbarItem’ are outlets, connected in the nib.  So a disadvantage of my method is that you need an outlet for any removable toolbar item.  But I have only have one, and it works for me.

> in the customization, neither is single item nor as part of the default toolbar configuration.

I hope that clause was not important because I don’t understand 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>)

  • Prev by Date: Core Data : Synchronizing objects with SQLite file
  • Next by Date: Re: [NSPointerArray copy] problem
  • Previous by thread: Re: NSToolbar delegate -toolbarAllowedItemIdentifiers not getting called, other delegate methods are
  • Next by thread: Re: NSToolbar delegate -toolbarAllowedItemIdentifiers:
  • Index(es):
    • Date
    • Thread