• 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: Standard NSToolbarItems
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Standard NSToolbarItems


  • Subject: Re: Standard NSToolbarItems
  • From: Brian Webster <email@hidden>
  • Date: Thu, 29 Nov 2001 13:39:20 -0600

On Thursday, November 29, 2001, at 11:12 AM, cocoa-dev-
email@hidden wrote:

I'm having a small problem constructing a toolbar for an application
I'm working on. The toolbar items that I create work perfectly, but
I'd also like to use a couple of Apple's predefined standard toolbar
items. If I just do something like the following, the item itself
works and displays correctly in the toolbar, but it shows up as a
completely blank object in the customization sheet(no name, no image,
but can still be dragged to the toolbar):

[tDict setObject:[[NSToolbarItem alloc]
initWithItemIdentifier:NSToolbarFlexibleSpaceItemIdentifier]
forKey:@"Flexible Space Item"];

where the delegate methods allow the toolbar to get items from tDict.
Any ideas?

I have code very similar to this, storing my toolbar items in a dictionary for retrieval. My code differs in that I don't add any items to the dictionary for built-in identifiers, so my delegate just ends up returning nil for those items. I had actually never realized that my code did this before, because it just works, but give it a shot and see if it works for you too.

--
Brian Webster
email@hidden
http://homepage.mac.com/bwebster


  • Prev by Date: Re: Displaying Unicode
  • Next by Date: Strange Errors
  • Previous by thread: NSScreen isn't notified of resolution switch
  • Next by thread: Strange Errors
  • Index(es):
    • Date
    • Thread