Re: Get controller from nib
Re: Get controller from nib
- Subject: Re: Get controller from nib
- From: Mark Ritchie <email@hidden>
- Date: Tue, 18 May 2010 17:06:00 -0700
On 18/May/2010, at 4:28 PM, James Maxwell wrote:
> 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?
Hey James,
I would do it this way:
Modify the nib file containing the MIDIInstrument so that FilesOwner is class Central_MIDI_Controller.
Create an outlet on MIDIInstrument which would point to Central_MIDI_Controller.
In IB, wire up the outlet from MIDIInstrument to FilesOwner.
Finally change the code which loads the nib containing MIDIInstrument to pass the one instance of Central_MIDI_Controller as the FilesOwner.
The unarchiving process will handle connecting up the bits at runtime.
HTH,
M.
_______________________________________________
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