• 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
And another thing I don't quite understand... ;-)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

And another thing I don't quite understand... ;-)


  • Subject: And another thing I don't quite understand... ;-)
  • From: Matt Ridley <email@hidden>
  • Date: Tue, 8 May 2001 15:48:02 +0100

Sorry, it's me once again. :-)

This again relates to an NSToolbar. For convenience, I'm storing my NSToolbarItems in an NSMutableDictionary. My NSToolbar delegate implements a method to return the list of default toolbar items as an array. I'm having problems retrieving an item from my NSMutableDictionary, to pass within the array. Here's a simplified version of the code:

return [NSArray arrayWithObjects: NSToolbarCustomizeToolbarItemIdentifier,
[toolItems objectForKey:@"Sample"], nil];

As you can see, I'm trying to return an array of three NSToolbarItems: the default Customize item (NSToolbarCustomizeToolbarItemIdentifier), the item I put into my NSMutableDictionary (called "toolItems") and gave the key "Sample", and nil.

The error returned leads me to believe that the Cocoa runtime is trying to send a NSMutableDictionary-specific message to an NSToolbarItem which of course doesn't handle the message. I'm not sure how to proceed. Help appreciated!


Best,
-Matt

--
Matt Ridley
<http://www.mattridley.com/>


  • Follow-Ups:
    • NSAppleEventManager (id)hanlder
      • From: Rosyna <email@hidden>
    • Re: And another thing I don't quite understand... ;-)
      • From: John Hörnkvist <email@hidden>
  • Prev by Date: Re: Something I don't understand...
  • Next by Date: Re: And another thing I don't quite understand... ;-)
  • Previous by thread: Re: Something I don't understand...
  • Next by thread: Re: And another thing I don't quite understand... ;-)
  • Index(es):
    • Date
    • Thread