Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

QCRenderer and getting the OutputPort values



I've have a composition with published input and output ports defined, that worked when I used a QCView to render it, and had the addObserver: forKeyPath:  working, so that whenever an outputPort changed I would get my callback.
My problem is that my application needs to have many windows of renderers that come and go, but the docs say the QCView can only be instantiated through the IB.  I even tried having my own windows with the QCViews and could never get it to work.  I then migrated to using the QCRenderer class and the PlayerApplication as a base.  I've got my compositions rendering, but I can't see how to get the output values to my app.  (I have subclasses the NSApplication and am forwarding events)
From what I understand I don't need to do the addObserver: forKeyPath:.  There's a point in the QC Programming manual that says in the renderWithEvent (from PlayerApplication) that I should just call the valueForOutputKey for my key.  I've done this and it does not work.  In the QCView I use "patch.foo.Value" whereas here I just use "foo".  Any ideas?

Also, I'm going to have many, many outputs, so I don't want to go through them all and see if they are different than the previous values.  What is the best way to do this?  can I still add the "addObserver: forKeyPath:" ??

if(![renderer renderAtTime:time arguments:arguments])
NSLog(@"Rendering failed at time %.3fs", time);

//Parse any output events
BOOL isClicked = [renderer valueForOutputKey:@"foo"];
NSLog(@"Value of foo click:%d",isClicked);
//This always returns 0!!!!!

//Display context on screen (which means swap from the back buffer)
[_glContext flushBuffer];

Thanks for the help,
Kevin

Attachment: smime.p7s
Description: S/MIME cryptographic signature

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Quartzcomposer-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/quartzcomposer-dev/email@hidden

This email sent to email@hidden



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.