On 2/7/14 11:19 PM, Jerry Krinock wrote:
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 <ms_li...@shiftoption.com> 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.

It is important, I'm afraid. Removing the items from the toolbar is not a problem. However, I can't get the toolbar to remove them from the customization sheet.

I thought the whole point of telling the toolbar which of the items are allowed is that those items will not be shown them during customization (or anywhere else). The -toolbarAllowedItemIdentifiers: delegate method is called at the beginning of the customization (before the sheet comes up), that's a hint that it's used for a purpose that has to do with customization. But apparently its result is ignored because items that are disallowed (by not returning them in this delegate method) are still visible.

Regards
Markus
--
__________________________________________
Markus Spoettl
_______________________________________________

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