Menu

#12 GTextArea can throw exception

1.0
closed
None
bug
2016-05-27
2016-05-26
No

When you press F1 GTextArea will be cleared, BUT the caret will remain in old position. Than if you try to enter any key StringIndexOutOfBoundsException will be thrown.

import g4p_controls.*;
import java.awt.event.KeyEvent;

GTextArea a;

public void setup() {
  size(640, 400);
  a = new GTextArea(this, 20, 20, 280, 200);
}

public void draw() {
  background(255, 128, 128);
  fill(255);
  text(a.getText(), 340, 20, 280, 200);
}

void keyPressed() {
  if (keyCode == KeyEvent.VK_F1) {
    a.setText("");
  }
}

Discussion

  • Quarks Processing

    • summary: GTextArea can through exception --> GTextArea can throw exception
     
  • Quarks Processing

    • status: open --> closed
     
  • Quarks Processing

    Fixed in 4.0.4

     

Log in to post a comment.

MongoDB Logo MongoDB