So I’m trying out the new JUCE_LIVE_CONSTANT stuff and it’s cool… but I decided to try a multiline string…
In my class constructor I’ve set the String variable:
m_szMyString = JUCE_LIVE_CONSTANT ("Some text starts here\r\nand the next line.");
in my paint() method I have:
int x = JUCE_LIVE_CONSTANT(600);
int y = JUCE_LIVE_CONSTANT(75);
int w = JUCE_LIVE_CONSTANT(300);
g.drawMultiLineText (m_szMyString, x, y, w);
if m_szMyString doesn’t use the JUCE_LIVE_CONSTANT the code works okay and I can adjust x, y and w… but if I use JUCE_LIVE_CONSTANT with the string containing \r\n I get an assert in TextEditor::setText() at line 1185
// if you're adding text with line-feeds to a single-line text editor, it
// ain't gonna look right!
jassert (multiline || ! newText.containsAnyOf ("\r\n"));
The only other thing… I have to force a repaint to see the changes…
JUCE_ENABLE_LIVE_CONSTANT_EDITOR is defined.
Thanks,
Rail