okay, there seems to be a big design flaw here... I think this will all be 
simpler if I have a separate MIDI_Instrument_Controller, loaded in the nib, 
which can deal with the table and the Central_MIDI_Controller. Then I'll let 
the NSArrayController deal with instances of the MIDIInstrument itself. I'm 
going to poke away at this for a bit. Sorry for the spam.

J.

On 2010-05-18, at 5:42 PM, James Maxwell wrote:

> ugh...
> 
> Okay, getting a bit deeper into this, I realize I'm still "in the woods", so 
> to speak. I'm going to have to hook up my NSTableView to set the *selected* 
> port and channel for the MIDIInstruments, which means it's pretty much going 
> to have to be loaded in the nib after all (since the MIDIInstrument has to 
> respond to the selection made in the table). So, if I do that, and make the 
> connections to Central_MIDI_Controller, as recommended, will the 
> NSArrayController be able to add new instances of MIDIInstrument (and new 
> rows to my table), which also have these connections? As I mentioned, I need 
> an arbitrary number of MIDIInstruments. 
> 
> Kind of confused about this...
> 
> thanks in advance.
> 
> J.
> 
> 
> On 2010-05-18, at 5:26 PM, James Maxwell wrote:
> 
>> Yes, this is basically what I've done, and it does seem to work...
>> 
>> On 2010-05-18, at 4:49 PM, Jens Alfke wrote:
>> 
>>> 
>>> On May 18, 2010, at 4:28 PM, James Maxwell wrote:
>>> 
>>>> I know this is probably really simple, but how do I grab a reference to a 
>>>> controller object loaded only in the MainMenu.nib file?
>>> 
>>> You can add an outlet to your app controller object pointing to that 
>>> controller object, and then add an accessor method that returns it.
>>> 
>>> @interface MyAppController : NSObject
>>> {
>>>     IBOutlet Central_MIDI_Controller* _midiController;
>>> }
>>> @property Central_MIDI_Controller* midiController;
>>> @end
>>> 
>>> 
>>> @implementation MyAppController
>>> @synthesize midiController = _midiController
>>> @end
>>> 
>>> Then just wire up _midiController in IB.
>>> 
>>> —Jens
>> 
>> James B Maxwell
>> Composer/Doctoral Student
>> School for the Contemporary Arts (SCA)
>> School for Interactive Arts + Technology (SIAT)
>> Simon Fraser University
>> jbmaxw...@rubato-music.com
>> jbmax...@sfu.ca
>> 
>> _______________________________________________
>> 
>> 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/jbmaxwell%40rubato-music.com
>> 
>> This email sent to jbmaxw...@rubato-music.com
> 
> James B Maxwell
> Composer/Doctoral Student
> School for the Contemporary Arts (SCA)
> School for Interactive Arts + Technology (SIAT)
> Simon Fraser University
> jbmaxw...@rubato-music.com
> jbmax...@sfu.ca
> 
> _______________________________________________
> 
> 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/jbmaxwell%40rubato-music.com
> 
> This email sent to jbmaxw...@rubato-music.com

James B Maxwell
Composer/Doctoral Student
School for the Contemporary Arts (SCA)
School for Interactive Arts + Technology (SIAT)
Simon Fraser University
jbmaxw...@rubato-music.com
jbmax...@sfu.ca

_______________________________________________

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