Cannot Bind Pop Up Button to Array of Dictionaries
Cannot Bind Pop Up Button to Array of Dictionaries
- Subject: Cannot Bind Pop Up Button to Array of Dictionaries
- From: Colin Cornaby <email@hidden>
- Date: Mon, 20 Aug 2007 15:08:31 -0700
I'm having trouble with something that should be a mindless task. I'm
trying to bind a pop up menu to an array of dictionaries. The
dictionaries contain two values, a human readable name, and a more
internal data representation friendly name. I create the array of
dictionaries like so:
[self setDatabases:[NSArray arrayWithObjects:
[NSDictionary dictionaryWithObjects:[NSArray
arrayWithObjects:@"humanName", @"sqlName", nil]
forKeys:[NSArray arrayWithObjects:@"Darth Vader, Lord of the Sith",
@"darth.vader", nil]],
[NSDictionary dictionaryWithObjects:
[NSArrayarrayWithObjects:@"humanName", @"sqlName", nil]
forKeys:[NSArray arrayWithObjects:@"Yoda, Jedi Master",
@"yoda.greenface", nil]],
nil]];
(Some constants changed to protect the innocent..)
I vend this array to other objects via an accessor named databases. I
have an array controller's content array bound to my vending objects
databases accessor.
Finally I have my pop up button. It's content is bound to my array
controller's arranged objects, and it's content values are bound to
the arranged objects, with the key as "humanName".
The weird thing is that while my pop up button shows the correct
number of rows, they're all blank. I plug in a placeholder for all the
situations where a value could be nil and so on, and all the rows
still show up as blank. Nothing looks funny with my memory management...
Anyone have any ideas why this could be going on?
Thanks,
Colin
_______________________________________________
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