Re: Binding directly to instance
Re: Binding directly to instance
- Subject: Re: Binding directly to instance
- From: Jeff LaMarche <email@hidden>
- Date: Tue, 3 Jan 2006 14:03:19 -0500
On Jan 3, 2006, at 1:57 PM, Matt Neuburg wrote:
How about if you just type "self" as the model key path in the
doubleClickTarget binding?
Tried that. Also tried creating an "accessor" that returns self. It
crashes in both instances. I was able to work around this by using
other bindings (selectedIndex in this case), but it's annoying :(
Namely, the NSArrayController's arrangedObjects? m.
Nope, also tried that and it didn't work. While you do bind the
contentValues or contentObjects to arrangedObjects, you're supposed
to bind content to an array controller. arrangedObjects returns an
array, not an array controller. Again, I was able to work around this
by doing it old school by setting the target and doubleAction of the
table in awakeFromNib:, but it's annoying that there's no way to get
around the model key path or controller key being required; there are
times when you have a valid reason to bind directly to an instance
without need to specify a key. Instances are objects, just like those
things returned by using getValueForKey:
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden