i just tested your JUCE_LIVE_CONSTANT macro with a simple 'GUI Application'
(with basic window) made by introjucer and used your example code for the
paint()-method from the juce_LiveConstantEditor documentation.
everything works as expected and it is VERY nice !!!
but i wonder if it's possible to get it working in an audio-plugin as well !?
so, i created (again with introjucer) a new audio-plugin-project and
wrapped the font-size-setting in the paint()-method inside a
JUCE_LIVE_CONSTANT macro.
g.setFont (JUCE_LIVE_CONSTANT(15.0f));
then i started the debugging.
i got two assertions (in juce_File.h):
else if (! path.containsChar (':'))
{
/* When you supply a raw string to the File object constructor, it must be an absolute path.
If you're trying to parse a string that may be either a relative path or an absolute path,
you MUST provide a context against which the partial path can be evaluated - you can do
this by simply using File::getChildFile() instead of the File constructor. E.g. saying
"File::getCurrentWorkingDirectory().getChildFile (myUnknownPath)" would return an absolute
path if that's what was supplied, or would evaluate a partial path relative to the CWD.
*/
jassertfalse;
return File::getCurrentWorkingDirectory().getChildFile (path).getFullPathName();
}
after continuing the additional 'live constants editor window' shows up as expected.
but unfortunately if i change the font-size value in the "juce live constants window",
it has no effect an the editor window at all.
do you have any idea what i'm doing the wrong way ?
by the way:
i'm on windows 7 (64bit) and testing / debugging the plugin inside VSTHost ( Hermann Seib ) v1.5.2
Well, you can see what it's trying to do: The macro uses the __FILE__ macro to find out the name of your source file, and the File class is complaining that it's not an absolute path. Not sure why that is, but what's the actual path that it's complaining about?
No major issue on Windows 8.1, I added the JUCE_LIVE_CONSTANT in a plug-in, I open it on Reaper, and I get the new window allowing me to change some parameters, even if a few things there seemed odd (but not enough to prevent me from doing what I needed to)