0

I'm trying to set up a QCView inside a Cocoa project but seem to be going round in circles as much of the available documentation is depreciated. I've followed this:

http://kineme.net/forum/DevelopingCompositions/ProblemusingQCPatchController#comment-23250

And got some simple KVC bindings working. But can't work out how to access the published inputs on a code level.

I understand that you can use setValue: forKeyPath: but dont know how to access the Object controller that was created in the IB interface by dragging and dropping.

How can i find out what the active Object controller is called? Once I know what that ivar is, is it as simple as:

[NSObjectContoller setValue:(id) forKeyPath:(NSString)];

Or is there something more to this?

RichPorter
  • 87
  • 8

1 Answers1

0

I've managed to work this out myself.

Create an IBOutlet from the Object Controller in your .h file. For Simplicity I'm doing this inside my AppDelegate.h

you can call setVlaue: forKeyPath: on your instance of the Object Controller.

For me this looks like:

[_theObjectController setValue:sender forKeyPath:@"selection.patch.Green.value"];

note that the key path is "selection.patch.Green.value" You need to add your controller key to the beginning of you Model Key Path.

RichPorter
  • 87
  • 8