I've encountered a few scenarios where I'd like to show some entries in an NSDictionary in an NSTableView. (My instincts to user an NSDictionaryController are always foiled by the need to make every object implement copyWithZone, which I find to be an absurd requirement that is fatal to usability...)
Instead, I'm trying to bind an NSArrayController to the allValues property of an NSDictionary, with the intent of binding respective columns of the table various properties of the objects in the array. However, I can't find a correct way to specify this binding within Cocoa, via the Controller Key and Model Key Path properties of the array controller.
When I attempt to bind the array directly to allValues, the array controller's arrangedObjects property is constantly empty - even when objects are added to the dictionary, when the addition is enclosed by [dictionary willChangeValueForKey: @"allValues"] and [dictionary didChangeValueForKey: @"allValues"] calls, even after calling setContent: on the array controller after adding the object.
Of course, I found this Stack Overflow thread:
Binding to an NSDictionary's "allValues" array
...and tried various versions of @"@allValues" in the Model Key Path field, but none produced the desired results.
So here's my question: If I have ArrayControllerOne bound to an object, and I'd like to bind ArrayControllerTwo to the allValues property of an NSDictionary property (called "instances") within ArrayControllerOne.selection, what should I enter in the Controller Key and Model Key Path fields?
Thanks in advance...