Loading...
Logo
Processing Forum

EEG Hack

in Contributed Library Questions  •  1 year ago  
Hi everyone,

I was following the step by step tutorial in this hack 


yet in the final step, when I run the sketch in Processing the following errors come up:


Apr 12, 2012 12:35:36 PM controlP5.Textlabel printConstructorError
SEVERE: The Textlabel constructor you are using has been deprecated, please use constructor
new Textlabel(ControlP5,String,int,int) or
new Textlabel(ControlP5,String,int,int,int,int) or
new Textlabel(ControlP5,String,int,int,int,int,int,int)
instead. The Textlabel with value 'Attention' is disabled and will not be rendered.
Exception in thread "Animation Thread" java.lang.NullPointerException
at controlP5.Textlabel.setFont(Unknown Source)
at brain_grapher$Monitor.<init>(brain_grapher.java:498)
at brain_grapher.setup(brain_grapher.java:85)
at processing.core.PApplet.handleDraw(PApplet.java:1608)
at processing.core.PApplet.run(PApplet.java:1530)
at java.lang.Thread.run(Thread.java:680)


I am not sure what this means, could anyone point to a fix for this? thank you. 

Replies(3)

Re: EEG Hack

1 year ago
Well, the meaning is quite clear. Apparently, you use a line looking like new Textlabel( ... ) with some parameters between the parentheses. The list of parameters you use is deprecated, ie. should no longer be used. Use one of the given alternatives instead (the instance of ControlP5 class, a string, and 2 to 6 integers).

Re: EEG Hack

1 year ago
Hi, 

I have tried switching but am unsure what values I am suppose to replace them with. Thank you for your time :)

Re: EEG Hack

1 year ago
According to the source code for ControlP5 the parameters are.

new Textlabel(ControlP5,String,int,int)

                                                      value      x       y

new Textlabel(ControlP5,String, int, int, int, int)
                                                       value      x         y       width   height

new Textlabel(ControlP5,String, int, int, int, int, int, int)
                                                       value      x         y       width   height  color   font