problem with "selection" controller key when showing NSComboBoxCell content values
problem with "selection" controller key when showing NSComboBoxCell content values
- Subject: problem with "selection" controller key when showing NSComboBoxCell content values
- From: Eli Manjarrez <email@hidden>
- Date: Tue, 23 Jun 2009 16:56:51 -0700
I have a Core Data Document-Based Application, and I'm running into a
problem with bindings and the NSComboBoxCell.
Background: I have a table, the columns of which are bound (via an
array controller) to respective properties of one entity
("mainEntity") in my data model. mainEntity has a to-many
relationship to subEntity in my data model. Via a second controller
(bound to the "selection.relationshipName" controller key of the first
controller), I have managed to bind the content values of my combo box
cell to a property of subEntity. This all works quite well, except
for the following...
Problem: When running the program, and clicking on the ellipsis of the
combo box for a row that isn't already selected, the content values
that appear are those for the previously-selected row, even though the
act of clicking the ellipsis causes its row to become selected. Thus,
if I select row A, then click on the ellipsis of the combo box of row
B (which has the effect of also selecting row B), the content values
that appear are those associated with row A. If I click two more
times on the ellipsis for row B's combo box (hiding and showing again
the content values), the correct values (i.e. the ones associated with
row B) appear.
So it seems like the selected table row is updating after the combo
box cell has gotten and displayed its content values. Does anyone
know a way to get the combo box to show values related to the row that
it is in? The first thing that comes to mind is to continue what I'm
doing, but find a way to get the table row selection to change before
the combo box cell gets/shows its values, in hopes that this will
allow the controllers to pull the right data first, however none of
the approaches I've tried (delegate methods, using actions, etc.) have
worked so far. Perhaps there is even a better way to configure the
bindings that would get around this issue entirely.
Thanks in advance for your help.
_______________________________________________
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