Hello,
I try to get a simple listbox added to my test project but I get this compiler error all the time:
Compiler Error C2512. ‘identifier’ : no appropriate default constructor available
I’ve started using Jucer with the same problem, then I decided to try it directly but I can’t get rid of this error.
I’ve searched the forum but couldn’t find something helpful.
This is what I did:
Vcommander.h
public:
//==============================================================================
VCommanderEditor (AudioProcessor *_VCommander);
~VCommanderEditor();
//==============================================================================
//[UserMethods] -- You can add your own custom methods in this section.
//[/UserMethods]
void paint (Graphics& g);
void resized();
void sliderValueChanged (Slider* sliderThatWasMoved);
// Binary resources:
static const char* buttonBkg_off_png;
static const int buttonBkg_off_pngSize;
//==============================================================================
juce_UseDebuggingNewOperator
private:
//[UserVariables] -- You can add your own custom variables in this section.
ListBox* MyListBox;
//[/UserVariables]
VCommander.cpp
#include "VCommanderEditor.h"
//[MiscUserDefs] You can add your own user definitions and misc code here...
//[/MiscUserDefs]
//==============================================================================
VCommanderEditor::VCommanderEditor (AudioProcessor *_VCommander)
: AudioProcessorEditor(_VCommander),
//[UserPreSize]
//[/UserPreSize]
setSize (1200, 800);
//[Constructor] You can add your own custom stuff here..
addAndMakeVisible (MyListBox = new ListBox (T("Test")));
MyListBox->setRowHeight (28);
//[/Constructor]
I’ve skipped all the other code so far to keep this example code tiny.
Can somebody point me to the problem?
Thank you,
Joerg