Hi pros, I’m new to OOP and JUCE.
Anyone with the patience, I’ll dearly appreciate your help.
JuceDemo compiles & runs well
& so do JuceAmalgated & the Jucer.
Introjucer builds me a blank template, theJucer builds me a simple Component (I’ve named this JucerComponent)
I try to call the Component built by Jucer using:
mainWindow = new JucerComponent();
mainWindow->addAndMakeVisible(mainWindow);
& in shutdown() & systemRequestedQuit() I put:
Builds without Warnings or Errors, but when running, the window doesn’t come on, & I get:
[quote]JUCE v1.54.27
’testJuceGUI.exe’: Loaded ‘C:\Windows\System32\cryptbase.dll’
‘testJuceGUI.exe’: Loaded 'C:\Windows\System32\uxtheme.dll’
First-chance exception at 0x005fb197 in testJuceGUI.exe: 0xC00000FD: Stack overflow.
Unhandled exception at 0x005fb197 in testJuceGUI.exe: 0xC00000FD: Stack overflow.[/quote]
My main.cpp is:
[code]/*
This file was auto-generated by the Jucer!
It contains the basic startup code for a Juce application.
==============================================================================
*/
#include “…/JuceLibraryCode/JuceHeader.h”
#include “…/JuceLibraryCode/AppConfig.h”
//#include “MainWindow.h”
#include “…/…/…/juce_amalgamated.h”
#include “…/…/…/juce.h”
#include “…/…/…/juce_Config.h”
#include “JucerComponent.h”
//==============================================================================
class testJuceGUIApplication : public JUCEApplication
{
public:
//==============================================================================
testJuceGUIApplication()
{
}
~testJuceGUIApplication()
{
}
//==============================================================================
void initialise (const String& commandLine)
{
// Do your application's initialisation code here..
//mainWindow = new MainAppWindow();
mainWindow = new JucerComponent();
mainWindow->addAndMakeVisible(mainWindow);
}
void shutdown()
{
// Do your application's shutdown code here..
mainWindow->deleteAllChildren();
mainWindow = 0;
}
//==============================================================================
void systemRequestedQuit()
{
mainWindow->deleteAllChildren();
quit();
}
//==============================================================================
const String getApplicationName()
{
return "testJuceGUI";
}
const String getApplicationVersion()
{
return ProjectInfo::versionString;
}
bool moreThanOneInstanceAllowed()
{
return true;
}
void anotherInstanceStarted (const String& commandLine)
{
}
private:
//ScopedPointer mainWindow;
ScopedPointer mainWindow;
};
//==============================================================================
// This macro generates the main() routine that starts the app.
START_JUCE_APPLICATION(testJuceGUIApplication)
[/code]