[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [sc-dev] view getProperty question

it fails with errWrongType at setSlotColor because the slot is of the wrong type. Can one change this and if so, how?

setSlotColor() assumes that you already have a slot containing an instantiated Color object, which you don't because you are passing a string in. You first need to instantiate a Color object using something like:

PyrObject *scObj = instantiateObject(g->gc, s_color->u.classobj, 4, true, true);
SetObject(slot, scObj);

Then run setSlotColor() on the slot. I think that this will work, although it might do something weird with the key string you pass in.

This QC interface is a good idea. I've actually written an OSC patch (using the undocumented QC plugin API) so that I could interface the two. One of the problems I ran into with it was that you couldn't smoothly interpolate values (making text grow for instance) because of the cost of the network. Of course I could create a patch with beginning and end values and interpolate inside of QC, but that is a pain if it is being done often. Building QC into SC should solve that problem.