okay, so I kind of hacked around it. I gave my AppController (which is a delegate of File's Owner) an outlet for the Central_MIDI_Controller, and hooked that up in IB. Then I also gave the AppController an accessor for "midiController", that returns the reference to Central_MIDI_Controller connected in IB.
From the MIDIInstrument init, I can run [[NSApp delegate] midiController] and get the instance of Central_MIDI_Controller loaded in the nib. As I say, it feels a bit hackish. Though it does work, and advice is still welcome. cheers, J. On 2010-05-18, at 4:28 PM, James Maxwell wrote: > > Hello All, > > I'm working on MIDI set-up customization for my music app. I have a main > controller object, called Central_MIDI_Controller, that uses the VVMIDI > framework to detect MIDI ports, and handle low-level MIDI stuff. I have an > object called MIDIInstrument, which is a simple wrapper-type object, intended > to bundle together a name string with a MIDI port, channel, and some program > change "presets", defined by the user. > I've put the Central_MIDI_Controller in my MainMenu.nib, and it's settings > are stored in the UserDefaults. I put it there because I want it to persist > across different documents. What I'm wondering about is how to get the list > of available MIDI ports to the MIDIInstrument objects, which will be created > dynamically, as the user creates customized instances of MIDIInstrument. > What I'm not understanding is how to allow newly created MIDIInstrument > objects to read the available/enabled ports from Central_MIDI_Controller. 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? > > thanks in advance, > > J. > > > > 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