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
Vortico
(VCV - Andrew)
May 28, 2019, 9:26pm
2
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'
Vortico
(VCV - Andrew)
May 28, 2019, 9:33pm
4
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
Vortico
(VCV - Andrew)
May 28, 2019, 9:41pm
6
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