Re: View based table binding to alternate object?
Re: View based table binding to alternate object?
- Subject: Re: View based table binding to alternate object?
- From: Quincey Morris <email@hidden>
- Date: Tue, 11 Aug 2015 18:06:59 +0000
On Aug 11, 2015, at 09:46 , Jim Thomason <email@hidden> wrote:
>
> I rebound my second column:
> Table Cell View.Table View Cell. value is bound ->
> staticObjectController.selection.B.
>
> This does not work. I receive no errors (other than Xcode not being able to
> resolve the key path), and the table just displays the default text
> repeated.
I would start by changing the “B” in the binding to something invalid like “C”, to make sure that you get an error message at all.
If you do, then you need to investigate the value of ‘staticObjectController.selection.B’ at the time that the binding is established, which would have to be just after you return from ‘tableView:viewForTableColumn:row:’. So you could look at it just before you return.
However, I’m not sure I’d ever use the approach you’re trying. The ‘objectValue’ object seems better suited to being the glue object, so why not have it return the appropriate “B” in all cases, even if this means creating a custom object with A and B properties instead of using a dictionary?
_______________________________________________
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