[flext] call the same function from multiple inlet

dev scrime scrime.dev at gmail.com
Mon Sep 10 18:07:23 CEST 2012


Hi Patrick and Thomas,

Excellent !
The CbMethodResort is exactly what I needed.
I just compiled a test object that works as expected.

Thanks a lot.

I'm actually creating an object that evaluates the speed of a point in 
spaces with variable number of dimensions, with integrated resampling 
and dynamic filtering.
I already made 3 of them with fixed number of dimensions (1D, 2D and 
3D), but now all of these will be contained in a single object which 
will allow to do the same with much more dimensions ! ( I don't know if 
I will have the need for more dimensions one day, but at least it will 
be possible :) )

Just to keep you informed, I have a bunch of objects that are now quite 
mature (I think), all made with flext.
Still not downloadable because I have a very messy website which I 
temporarily disabled, and not enough time to clean it up.
But I'll come back to post here as soon as I clean it back.

Cheers,
Joseph

Le 10/09/12 10:45, Thomas Grill a écrit :
> 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