You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When you use .setMax() to set the maximum number of lines on a Println console and you then add println()'s inside draw(), the result is a StringIndexOutOfBoundsException. Below is a small code example that replicates the bug.
Code Example
importcontrolP5.*;
ControlP5cp5;
voidsetup() {
size(400, 200);
cp5 = newControlP5(this);
TextareamyTextarea = cp5.addTextarea("txt").setPosition(10, 10).setLineHeight(14).setColorBackground(color(0, 100));
cp5.addConsole(myTextarea).setMax(3); // without .setMax() it runs fine
}
voiddraw() {
background(128);
println(frameCount);
}
The text was updated successfully, but these errors were encountered:
When you use .setMax() to set the maximum number of lines on a Println console and you then add println()'s inside draw(), the result is a StringIndexOutOfBoundsException. Below is a small code example that replicates the bug.
Code Example
The text was updated successfully, but these errors were encountered: