[flext] call the same function from multiple inlet
Thomas Grill
gr at grrrr.org
Mon Sep 10 10:45:14 CEST 2012
Hi Joseph and all,
you might want to use (override in your derived class) the
virtual bool CbMethodResort(int inlet,const t_symbol *s,int argc,const
t_atom *argv);
method defined in flclass.h
The method is called for any message to a flext object that is not
handled by a registered function.
The inlet parameter will give you the inlet number, the other
arguments the message it is called for.
gr~~~
--
Thomas Grill
http://grrrr.org
Am 10.09.2012 um 09:35 schrieb Patrick Gampp:
> Hi Joseph,
> you have to register each callback function to an inlet.
>
> eg. FLEXT_CADDMETHOD_(c,inletNumber,"setOn",setOn);
>
> Of course, you could add also
> "FLEXT_CADDMETHOD_(c,inletNumber,"setOn",setOn);"
> for every inletNumber via preprocessor definitions.
>
> As this is a little bit cumbersome, I would suggest to use one fix
> inlet, which is responsable for leading to the callback function.
> Together with that, I would send an value which represents the input
> channel number which triggered the callback.
>
> Regards,
> Patrick
>
>
>
> Am 09.09.2012 20:40, schrieb dev scrime:
>> Hello list,
>>
>> I'm thinking about coding an external with a variable number of
>> inlets /
>> outlets.
>>
>> My problem is that I'd like to call the same function from any inlet,
>> and be able to know in this function which outlet is responsible
>> for its
>> execution.
>>
>> Is there a simple way to do this in flext ?
>>
>> Thanks,
>> Joseph
>> _______________________________________________
>> http://grrrr.org/ext/flext
>>
>> flext mailing list
>> flext at grrrr.org
>> http://grrrr.org/cgi-bin/mailman/listinfo/flext
>>
>
> _______________________________________________
> http://grrrr.org/ext/flext
>
> flext mailing list
> flext at grrrr.org
> http://grrrr.org/cgi-bin/mailman/listinfo/flext
More information about the flext
mailing list