Hi,
I want to enable JUCE_LIVE_CONSTANT
in my standalone app, but I hit an assert constantly.
The value is properly extracted, __FILE__
and __LINE__
are correct but the CodeDocument::Position
seems to be the issue. Variables line
just returns an empty string.
It looks like the CodeDocument
is not parsed correctly initially.
Here’s the assert:
void LivePropertyEditorBase::findOriginalValueInCode()
{
CodeDocument::Position pos (document, value.sourceLine, 0);
auto line = pos.getLineText();
auto p = line.getCharPointer();
p = CharacterFunctions::find (p, CharPointer_ASCII ("JUCE_LIVE_CONSTANT"));
if (p.isEmpty())
{
// Not sure how this would happen - some kind of mix-up between source code and line numbers..
jassertfalse; // <----- HERE
return;
}
[...]
My standalone app is pretty big, and I wonder that with all the different includes, parsing is done incorrectly. I’m also using CMake, which could be a source of error (post-processing of source files ?).
Looking for ideas to get this working.
Thank you in advance !
E.