[flext] Using buffer
Thomas Grill
gr at grrrr.org
Thu Sep 9 16:57:25 CEST 2010
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.
> 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.
gr~~~
More information about the flext
mailing list