Correction: I'm not using - (NSToolbarItem *)toolbar:(NSToolbar *)toolbar itemForItemIdentifier:(NSString *)itemIdentifier willBeInsertedIntoToolbar:(BOOL)flag
but other than that, same usage as you. On 09.08.2013, at 13:22, Pax <45rpmli...@googlemail.com> wrote: > Okay, I think that this might be a weird one. I've read the documentation, > and I've implemented a toolbar for my document based application. For the > most part, it works perfectly but its settings don't seem to be getting > saved. > > For example: > 1. If I have x many windows open and I add an item to the tool bar of one of > the windows then the toolbar of all of the windows will be updated correctly > (as I expect) > 2. If I then open another document window then that window will contain the > default set of items only, and not the additional item that I added in the > last step. > 3. If I then add the item to the window that I just opened it will have one > instance of the item, and all the other windows will have two instances of > the item. > 4. If I then quit the application and reload it, all windows will return to > having the default set of items only. > > Clearly, this behaviour (except step 1) is wrong. Can anyone suggest what I > might have messed up? > > My tool bar settings are as follows: > [toolbar setAllowsUserCustomization:YES]; > [toolbar setAutosavesConfiguration:YES]; > [toolbar setDisplayMode:NSToolbarDisplayModeIconOnly]; > [toolbar setDelegate:self]; //I suspect that this might not be needed > > > I have implemented the following (as per the documentation): > - (BOOL) validateToolbarItem: (NSToolbarItem *) toolbarItem > - (NSToolbarItem *)toolbarItemWithIdentifier:(NSString *)identifier > label:(NSString *)label > paleteLabel:(NSString *)paletteLabel > toolTip:(NSString *)toolTip > target:(id)target > itemContent:(id)imageOrView > action:(SEL)action > menu:(NSMenu *)menu > - (NSToolbarItem *)toolbar:(NSToolbar *)toolbar > itemForItemIdentifier:(NSString *)itemIdentifier > willBeInsertedIntoToolbar:(BOOL)flag > - (NSArray *)toolbarDefaultItemIdentifiers:(NSToolbar *)toolbar > - (NSArray *)toolbarAllowedItemIdentifiers:(NSToolbar *)toolbar > > For any help you can offer, I am most grateful! > _______________________________________________ > > 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/michael.starke%40hicknhack-software.com > > This email sent to michael.sta...@hicknhack-software.com ___m i c h a e l s t a r k e____ geschäftsführer HicknHack Software GmbH www.hicknhack-software.com ___k o n t a k t____ +49 (170) 3686136 cont...@hicknhack.com ___H i c k n H a c k S o f t w a r e G m b H____ geschäftsführer - maik lathan | andreas reischuck | michael starke bayreuther straße 32 01187 dresden amtsgericht dresden HRB 30351 sitz - dresden _______________________________________________ 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