Re: Bindings: changing model changes some views but not others (NSTableColumn)
Re: Bindings: changing model changes some views but not others (NSTableColumn)
- Subject: Re: Bindings: changing model changes some views but not others (NSTableColumn)
- From: Scott Stevenson <email@hidden>
- Date: Fri, 1 Dec 2006 20:32:33 -0800
On Dec 1, 2006, at 11:01 AM, Sean McBride wrote:
True enough! If you or anyone else would like to take 2 minutes to
check it out, I've distilled it down to something very simple (I know
your time is precious). No code changes are needed, you just use
one of
two versions of the NIB. One NIB uses an NSArrayController in the
NIB,
the other uses an NSArrayControllor created programatically and
accessed
via File's Owner. This screenshot shows the differences in bindings:
<http://www.rogue-research.com/vtk/BindingComparisions.png>
The zipped up project is here:
<http://www.rogue-research.com/vtk/NSTableColumnNotUpdating.zip>
You certainly win the prize for the best question asking. The project
and screenshots (and included instructions) made this easier by miles.
I mucked around with this for a while, and could probably figure it
out given enough time, but I'm sure somebody with Cocoa source code
could do it much faster. If you you have an ADC tech support
incident, this would be a good time to use it.
Something interesting is that if you unbind the table view itself
(just leaving the columns bound), you don't get any row data at all.
That's clearly wrong, so it suggests what you're seeing is just a
reflection of something more fundamental.
It wouldn't surprise me if this was a garden variety bug that few
people ever encounter. This is the first time I've seen a
configuration like this, though I think I understand the rationale.
One other stab in the dark thing you could try:
Bind the table columns directly to the array controller in code. I
suspect all of this has something to do with the fact that the table
columns don't realize they're getting their data from an array
controller. All they know is they're somehow getting this data from
some array somewhere, which happens to have "arrangedObjects" in the
name. That may not even be a supported configuration.
If you bind directly to an array controller, the table columns may
snap to life, addressing the underlying issue. It's amazing how many
bindings issues are solved by breaking the bindings in multiple steps
instead of trying to bind to one long keypath.
If that does work, please post a follow-up.
- Scott
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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