setSwitch(true) Error

Hi,
I’m having an issue with the controlP5 Library in processing.

setSwitch(true)

I’m using this line of code to make the button toggle. it works but I’m getting this error message.

 controlP5.ControlBroadcaster invokeMethod
 WARNING: java.lang.IllegalArgumentException: wrong number of arguments

the program doesn’t crash but it’s slowing down.

and this is my code…

button_settngs.addButton("settings")
    .setPosition(50, 50)
    .setValue(0)
    .setImages(settings_button_img)
    .updateSize()
    .setSwitch(true)
    ;

If i make setswitch(false) everythis works fine. imean no error message.

thanks in advance.

2 Likes