Arghh bindings
Arghh bindings
- Subject: Arghh bindings
- From: Rick Mann <email@hidden>
- Date: Mon, 10 Sep 2012 18:29:46 -0700
Despite having successfully written several apps that use bindings, I still manage to screw it up each time I start a new one.
I have a little object that has an NSMutableArray property called "connections". I tried to bind an NSArrayController to it, and then bind an NSTableView to that. But it doesn't work. The array holds NSDictionaries with a handful of key-value pairs.
Trying to debug things, I created an NSTextField and bound it in turns to the app delegate, then the property that points to my object, then the connections property of that object, and finally to @count of the connections property.
It always shows zero, and never increments when new objects are added to the connections array.
I remembered the need to add some mutable accessor methods, so I implemented
- (void)
insertConnection: (NSDictionary*) inConn
atIndex: (NSUInteger) inIndex
and the removal counterpart. Didn't help. I recall the mere presence of those in the past fixed my issues, and I could still add and remove objects to the mutable array directly (via its property).
So I tried calling -insertConnection:atIndex: instead. Still didn't help.
What am I overlooking?
Thanks.
--
Rick
_______________________________________________
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