[flext] Using buffer
Nicolas Montgermont
nicolas_montgermont at yahoo.fr
Thu Sep 9 17:09:34 CEST 2010
Hi Thomas,
thanks for the fast answer.
Le 09/09/10 16:57, Thomas Grill a écrit :
> Hi Nicolas,
>
>> I'm updating the msd object series and I'm running inside a little problem...
>> This object is mainly based on a big template.
>> Inside it there are many classes and only one of them is a child of the flext_base class.
>>
>> The problem is I need to access a pd table within one of these "non-flext" class.
>> when I declare a buffer variable I have these errors:
>> ../src/msd.h:181: error: ISO C++ forbids declaration of ‘buffer’ with no type
>> ../src/msd.h:181: error: expected ‘;’ before ‘*’ token
>> than I can understand cause I have no buffer type.
>>
> you can access the flext::buffer type by explicitly using this type definition.
>
it compiles and doesn't crash pd.
Seems obvious once explained.
>> If I try to have the class inherit from flext with:
>> class Link:
>> public flext_base
>> {
>> FLEXT_HEADER(Link,flext_base)
>> ...
>> it compiles fine but calling the constructor of this class through pd makes pd crash.
>>
> flext_base is the C++ base class for Pd/Max externals, which is probably not what you want.
> If you just want to import the flext namespace, use
> class Link: public flext {};
> without the FLEXT_HEADER statement.
ok good to know.
Thanks again,
All the best,
Nicolas
--
http://nim.on.free.fr
More information about the flext
mailing list