We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
IndexProgramming Questions & HelpOther Libraries › ControlP5 problem
Page Index Toggle Pages: 1
ControlP5 problem (Read 1660 times)
ControlP5 problem
Nov 27th, 2009, 2:12am
 
I've a problem with a ControlP5 library. Infact when i run the program


import controlP5.*;

ControlP5 controlP5;

public int myColorRect = 200;

public int myColorBackground = 100;


void setup() {
 size(400,400);
 frameRate(25);
 controlP5 = new ControlP5(this);
 controlP5.addNumberbox("numberbox1",myColorRect,100,160,100,14).setId(1);
 controlP5.addNumberbox("numberbox2",myColorBackground,100,200,100,14).setId(2);
 controlP5.addSlider("slider1",100,200,100,100,250,100,14).setId(3);
 controlP5.addTextfield("text1",100,290,100,20).setId(4);
}

void draw() {
 background(myColorBackground);
 fill(myColorRect);
 rect(0,0,width,100);
}


void controlEvent(ControlEvent theEvent) {
 println("got a control event from controller with id "+theEvent.controller().id());
 switch(theEvent.controller().id()) {
   case(1):
   myColorRect = (int)(theEvent.controller().value());
   break;
   case(2):
   myColorBackground = (int)(theEvent.controller().value());
   break;  
 }
}

the result is this message,


Note that release 1.0, libraries must be installed in a folder named 'libraries' inside the 'sketchbook' folder.


and i don't know the solution for this!! what should i do? HELP ME!!!

bye!
Re: ControlP5 problem
Reply #1 - Nov 27th, 2009, 4:17pm
 
while in processing go to meny sketch -> show sketch folder . there create a folder named "library" where you place the ControlP5 folder . restart processing ...

its bad docu only Wink it should read library when it says 'libraries' ...

cheers
Re: ControlP5 problem
Reply #2 - Nov 27th, 2009, 4:43pm
 
dont do that.

you have to create a folder called "libraries" in your sketch folder. To find out where that is go to preferences...
now download the library and unpack it into that folder. be careful that you unpack the containing folders not in the root dir but in another folder called controlP5.
Page Index Toggle Pages: 1