Hi!
First of all, great library, really like it! I have a problem though.
When I create a GTextField like this
- GTextField textField = new GTextField(parent, "Surface " + ss.getId(), 0, 0, 160, 20, false);
- textField.setBorder(0);
- textField.addEventHandler(this, "handleMyTextFieldEvents");
- layerItems.add(new LayerItem(ss, textField));
And call
handleMyTextFieldEvents
- public void handleMyTextFieldEvents(GTextField t) {
- for (int i = 0; i < layerItems.size(); i++) {
- if (layerItems.get(i).getTextField() == t) {
- PApplet.println(t.getText());
- }
- }
- }
If I then click on a GTextField nothing happens, but when i click on another GTextField it prints the content of the previous GTextField.
Any suggestion on how to fix this behavior?
Thanks!
1