Re: NSToolbar delegate -toolbarAllowedItemIdentifiers:
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