I'm new to Flext, and haven't coded in C++ in a long time. Made a simple object that reads a symbol; I get the following error:
error: reference to non-static member function must be called
FLEXT_ADDMETHOD_S(0,"read",m_read);
Also can someone clarify the difference between the two ways to register methods (ADDMETHOD and CADDMETHOD) ?
Any help will be appreciated.
#include <flext.h>
#if !defined(FLEXT_VERSION) || (FLEXT_VERSION < 400)
#error You need at least flext version 0.4.0
#endif
class hello:
public flext_base
{
FLEXT_HEADER(hello,flext_base)
public:
hello();
protected:
void m_read(t_symbol *argument);
private:
FLEXT_CALLBACK_S(m_read)
};
FLEXT_NEW("hello",hello)
hello::hello() {
AddInAnything();
FLEXT_ADDMETHOD_S(0,"read",m_read);
}
void hello::m_read(t_symbol *argument) {
post("reading argument: %s)",GetString(argument));
}