Skip navigation.
 
mlPopups and NSDictionaryController
FROM : Gordon Apple
DATE : Sun Apr 20 00:37:02 2008

I have been trying my best to bind a popup menu to a Dictionary using
NSDictionaryController.  So far, no go.  I have been able to bind the popup
to a separate NSArray of keys using NSArrayCntroller, but have been unable
to bind to a dictionary having the same key list using
NSDictionaryController.  Logically, it seems like it should work.  After
all, NSDictionaryController is a subclass of NSArrayController.

    I bound the NSDictionaryController to the NSMutableDictionary, then
tried to bind the popup to its arrangedObjects, with the content binding to
arrangedObjects.key.  I also tried arrangedObjecte.self.key.  Nothing seems
to work.  Has anyone successfully done this?

    I wanted to use this as the master in a master/slave relationship where
the objects in the dictionary are arrays controlled by a separate
NSArrayController.  I suppose in the worst cast, I can create a separate
object with pairs to use in an array instead of the dictionary, but that
seems to be duplicating what the NSDictionary/NSDictionaryController pair
should have been able to do.

Related mailsAuthorDate
No related mails found.