If I have a method like:
@interface CharacterSet
+ (NSArray *)allCharacterSets;
@end
Can I bind to it using Cocoa bindings?
I'm trying to hook up an NSComboBox's content values to it. When I enter CharacterSet.allCharacterSets
into the "Model Key Path" field in IB, it doesn't work, saying:
[ addObserver: forKeyPath:@"CharacterSet.allCharacterSets" options:0x0 context:0x200275b80] was sent to an object that is not KVC-compliant for the "CharacterSet" property.
I'm not sure what else to try. Currently I have to store the return value of allCharacterSets
into an ivar in my custom window controller (or custom window) to make it work, which seems like an extra step I shouldn't have to take.