APP->engine->getModule(Module::id)

getting this error on one of my plugins:

**src/SEQ16.cpp:362:76:** **error:** **invalid use of non-static data member 'id'**

SEQ16 *SEQ16 = dynamic_cast<struct SEQ16*>(APP->engine->getModule(Module::id));

how should I pass module id ? I can’t find any info

Surround code/terminal output with ```.

Maybe use this->id or this->Module::id or simply id.

this->whatever gives

src/SEQ16.cpp:362:68: error: invalid use of 'this' outside of a non-static member function

simply using “id” i get:

src/SEQ16.cpp:362:68: error: use of undeclared identifier 'id'

This is more of a C++ question than a Rack plugin question. What is the context of your code snippet?

see: https://pastebin.com/fTYBWHWj for the complete code.
It’s basically the standard SEQ3 with some additional features

Not sure what you’re trying to do with the SEQ16createWidgetContextMenu or getModule functions. Maybe a regex killed its name?

Rename your function to SEQ16::createContextMenu, and use

SEQ16 *SEQ16 = dynamic_cast<SEQ16*>(this->module)
1 Like