Hi All,
The following code fails with
“error C2512: ‘JK_Clipboard’ : no appropriate default constructor available”
only if I try to make it a singleton class and I don’t understand why.
It compiles w/o any problem if not a singleton.
#include "juce.h"
class JK_Clipboard : public ListBox,
public ListBoxModel,
public DeletedAtShutdown
{
public:
//==============================================================================
JK_Clipboard (const String &componentName, int rowCount);
~JK_Clipboard();
juce_DeclareSingleton (JK_Clipboard, false)
//===============================================================================
int getNumRows();
void paintListBoxItem( int rowNumber, Graphics& g, int width, int height, bool rowIsSelected );
//==============================================================================
juce_UseDebuggingNewOperator
private:
int _rowCount;
//==============================================================================
// (prevent copy constructor and operator= being generated..)
JK_Clipboard (const JK_Clipboard&);
const JK_Clipboard& operator= (const JK_Clipboard&);
};
I would like to skip singleton here but I need to have acces to its instance but it
is inside a tabcontrol!
fileManagerTabComponent->addTab (T(“Tab1”), Colour (0xd3d3d3), new JK_Clipboard (T(“Clipboard”), 100), true);
What goes wrong here?
Thank you for your help!
Joerg