merlinvn / controlp5

Automatically exported from code.google.com/p/controlp5
0 stars 0 forks source link

Textfield IllegalArgumentException #60

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Try to interact with a textfield in Processing 2.0b1

What is the expected output? What do you see instead?
Expected to be able to write (or move the cursor if there's text) inside a 
textfield. IllegalArgumentException instead:

java.lang.NullPointerException
    at processing.mode.java.runner.Runner.findException(Runner.java:664)
    at processing.mode.java.runner.Runner.reportException(Runner.java:609)
    at processing.mode.java.runner.Runner.exception(Runner.java:552)
    at processing.mode.java.runner.EventThread.exceptionEvent(EventThread.java:367)
    at processing.mode.java.runner.EventThread.handleEvent(EventThread.java:255)
    at processing.mode.java.runner.EventThread.run(EventThread.java:89)
Exception in thread "Animation Thread" java.lang.IllegalArgumentException: 
argument type mismatch
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at processing.core.PApplet$RegisteredMethods.handle(PApplet.java:1076)
    at processing.core.PApplet.handleKeyEvent(PApplet.java:2848)
    at processing.core.PApplet.dequeueKeyEvents(PApplet.java:2793)
    at processing.core.PApplet.handleDraw(PApplet.java:2132)
    at processing.core.PGraphicsJava2D.requestDraw(PGraphicsJava2D.java:197)
    at processing.core.PApplet.run(PApplet.java:1998)
    at java.lang.Thread.run(Unknown Source)

What version of the product are you using? On what operating system?
Processing 2.0b1 and ControlP5 0.7.6 on GNU/Linux Ubuntu 10.04 LTS with 
Java(TM) SE Runtime Environment (build 1.7.0_07-b10)

Please provide any additional information below.
You can use the following code to reproduce the error:

import controlP5.*;

ControlP5 cp5;

void setup()
{
  size(256, 256);
  smooth();

  cp5 = new ControlP5(this);
  cp5.addTextfield("BUG")
    .setPosition(8, 8)
    .setSize(128, 20);
}

void draw()
{
  background(0);
}

Just try to write something inside the textfield.
Works fine in the same computer with Processing 1.5.1

Original issue reported on code.google.com by ymour...@gmail.com on 9 Sep 2012 at 1:09

GoogleCodeExporter commented 8 years ago
It also fails with the new version of ControlP5:

ControlP5 1.5.1 infos, comments, questions at 
http://www.sojamo.de/libraries/controlP5
java.lang.NullPointerException
    at processing.mode.java.runner.Runner.findException(Runner.java:664)
    at processing.mode.java.runner.Runner.reportException(Runner.java:609)
    at processing.mode.java.runner.Runner.exception(Runner.java:552)
    at processing.mode.java.runner.EventThread.exceptionEvent(EventThread.java:367)
    at processing.mode.java.runner.EventThread.handleEvent(EventThread.java:255)
    at processing.mode.java.runner.EventThread.run(EventThread.java:89)
Exception in thread "Animation Thread" java.lang.IllegalArgumentException: 
argument type mismatch
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at processing.core.PApplet$RegisteredMethods.handle(PApplet.java:1076)
    at processing.core.PApplet.handleKeyEvent(PApplet.java:2848)
    at processing.core.PApplet.dequeueKeyEvents(PApplet.java:2793)
    at processing.core.PApplet.handleDraw(PApplet.java:2132)
    at processing.core.PGraphicsJava2D.requestDraw(PGraphicsJava2D.java:197)
    at processing.core.PApplet.run(PApplet.java:1998)
    at java.lang.Thread.run(Unknown Source)

Original comment by ymour...@gmail.com on 9 Sep 2012 at 1:16

GoogleCodeExporter commented 8 years ago
the latest version as of now is 1.5.1 which is only working with processing 
1.5.1 and earlier as pointed out here 
http://code.google.com/p/controlp5/downloads/detail?name=controlP5-1.5.1.zip . 

Since there have been many new features, updates, changes and surprises with 
processing 2.0, controlP5 as is unfortunately breaks and needs to be adjusted. 
An updated version for post processing 1.5.1 will be available shortly, 
controlp5's version number will indicated this by changing to 2.0

Original comment by soj...@gmail.com on 9 Sep 2012 at 5:38

GoogleCodeExporter commented 8 years ago

Original comment by soj...@gmail.com on 22 Jan 2013 at 8:22