Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Println.setMax() results in StringIndexOutOfBoundsException #9

Open
AmnonOwed opened this issue May 14, 2015 · 0 comments
Open

Println.setMax() results in StringIndexOutOfBoundsException #9

AmnonOwed opened this issue May 14, 2015 · 0 comments

Comments

@AmnonOwed
Copy link
Contributor

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

import controlP5.*;
ControlP5 cp5;

void setup() {
  size(400, 200);
  cp5 = new ControlP5(this);
  Textarea myTextarea = cp5.addTextarea("txt").setPosition(10, 10).setLineHeight(14).setColorBackground(color(0, 100));
  cp5.addConsole(myTextarea).setMax(3); // without .setMax() it runs fine
}

void draw() {
  background(128);
  println(frameCount);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant