• 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
NSToolbar doesn't add default items issue on 10.5.2
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NSToolbar doesn't add default items issue on 10.5.2


  • Subject: NSToolbar doesn't add default items issue on 10.5.2
  • From: Martin Redington <email@hidden>
  • Date: Thu, 27 Mar 2008 17:58:11 +0000


I've got some NSToolbar code, which seems to have suddenly stopped working on Leopard only.


- (void) setupToolbar
{
	NSLog(@"Setting up toolbar");

//    [self removeObsoleteToolbarIdentifiers];

NSToolbar *toolbar = [[MMICleanerToolbar alloc] initWithIdentifier:@"CleanerToolbar"];

[toolbar setAllowsUserCustomization:YES];
[toolbar setAutosavesConfiguration:YES];
[toolbar setDelegate:self];

NSLog(@"Setting toolbar %@ for window %@", toolbar, mMainCleanerWindow);
[mMainCleanerWindow setToolbar:toolbar];
// release it as well? TODO
NSLog(@"Set up toolbar");
}


MMICleanerToolbar is a subclass of NSToolbar, but actually doesn't implement any methods, so it's an NSToolbar for all intents and purposes.

On Tiger, I can see the delegates -toolbarDefaultItemIdentifiers: method get called, followed by the NSToolbarItem calls, after the setToolbar: method.

On Leopard (10.5.2/9C31) [latest security update not installed yet], the delegate methods aren't getting called, and I get an empty toolbar, which looks to be slightly less tall than the standard toolbar with small items.

I rolled back over a few revisions of my app, and they all seem to be affected, so it doesn't seem like I've broken anything recently. The first user report I got for this was today (in fact I got two).

As I workaround, I'm checking [[toolbar items] count], after setToolbar: and manually inserting the default item set if the toolbar is empty.















_______________________________________________

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 doesn't add default items issue on 10.5.2
      • From: Peter Ammon <email@hidden>
  • Prev by Date: Re: Ephemeral Changes
  • Next by Date: NSTextField and IB Weirdness
  • Previous by thread: Re: NSScroller question
  • Next by thread: Re: NSToolbar doesn't add default items issue on 10.5.2
  • Index(es):
    • Date
    • Thread