Problem with setApplicationReturnValue


I have a problem when using "setApplicationReturnValue" in this situation:

In my apps initialise function I do:

/* some random work */

The app will always return 0 regardless of the value of x, this is becuse of this code:

if (! app->initialiseApp())
   return 0;

in JUCEApplicationBase::main(). I think this should be:

if (! app->initialiseApp()) 
   return app->getApplicationReturnValue();


Ah, good point, thanks!


Thanks for the quick fix!


Just a heads-up, this fix didn't make it to the repository (in juce_ApplicationBase.cpp).



No.. it's definitely fixed in the repo.