I have a problem with Core Data and bindings that I can't work out.

Here's the data model:

<<inline: Data Model2.jpg>>

It's a music app, and I'm trying to set up MIDI instrument customization for 
the user. The interface let's the user create new Instruments (MnS_Instrument 
entities) which map a name to a port and channel, new Articulations 
(Articulations entities) which map a name to a set of MIDI messages (controller 
changes, program changes, etc.), and then to assign the Articulations to 
Instruments. I have an array controller for each entity in the model. The 
AssignedArticulation controller gets its contentSet from 
[MnS_Instrument_controller selection].articulations, and the MIDIMessage 
controller gets its contentSet from [Articulation_controller 
selection].messages. (Note that I'm not hosting AUs yet, so virtualInstrument 
isn't used.)
Everything works as expected, up to the assignment of articulations to 
instruments.
I have a window with two tables: one showing the available instruments, and one 
for adding articulations to the selected instrument. The selection in the first 
table is bound to the [MnS_Instrument_Controller arrangedObjects].name, so that 
clicking a name selects a particular MnS_Instrument. The second table uses 
combo boxes for choosing which articulation to add; "+" and "-" buttons below 
the table are bound to the add: and remove: methods of 
AssignedArticulation_Controller. The available articulations, listed as choices 
in the combo boxes, are supplied by Articulation_controller, and they show up 
as expected. The value of the table selection is bound to 
[AssignedArticulation_Controller selection].articulation.name, the idea being 
that the AssignedArticulation will grab a named articulation from the set of 
stored Articulations, and assign it to the instrument. But when I release the 
combo box, it reverts back to "No Value" and won't make the assignment. 

Any ideas?

J.
_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to