I hope many of us have same problem of binding to work, specially nested binding.
Scenario :
I have a class Person, with name
and role
properties. Roles will come from other source.
Person Class:
@interface Person : NSObject
@property (strong) NSString *fullName;
@property (strong) NSString *role;
@end
AppDelegate Class:
@interface AppDelegate : NSObject <NSApplicationDelegate>
@property (assign) IBOutlet NSWindow *window;
@property (strong) NSArray *persons;
@property (strong) NSArray *roles;
- (IBAction)save:(id)sender;
@end
I have a tableview and a popup button. TableView is bind-ed to ArrayController.
How to bind popupbutton to roles, so that the selected value is updated in objects or Person, i.e. our model ?