Git Product home page Git Product logo

controlp5's People

Watchers

 avatar

controlp5's Issues

when attempting to set high value label on Range Slider, returns error "the function setHighValueLabel(String) does not exist"

What steps will reproduce the problem?
1. create Range myRange
2. assign myRange.setHighValueLabel("testme");
3. run sketch

What is the expected output? What do you see instead?
expect the string "testme" to be displayed at the right hand slider of the 
range.

What version of the product are you using? On what operating system?
ControlP5 0.5.4
Processing 1.5.1
Mac OSX 10.7

Please provide any additional information below.

it would be even more useful to be able to set the range high value label in 
the Range controlP5.controller, since it is already possible to set the range 
low value here.

Props for writing such a great library!

Original issue reported on code.google.com by [email protected] on 30 Apr 2012 at 2:14

ListBox text can exceed ListBox width

What steps will reproduce the problem?
1. Create text with a length that exceeds the width of the ListBox
2. See that the text does not truncate and runs over the edge of the width

What is the expected output?
I'd like to see the text truncated so that it doesn't go over the ListBox 
width.  Truncate a few characters short and add "..." to indicate truncation.

What version of the product are you using? On what operating system?
5.0, MacOS X 10.6.4

Original issue reported on code.google.com by [email protected] on 16 Jul 2010 at 4:27

The constructor Label(ControlP5bitFont, String, int, int, int) is undefined


What is the expected output? What do you see instead?
I am trying to run the ControlP5bitFont.pde but the following error occurs:
The constructor Label(ControlP5bitFont, String, int, int, int) is undefined

What version of the product are you using? On what operating system?
Processing 1.5.1
Windows XP

Original issue reported on code.google.com by [email protected] on 20 Apr 2012 at 10:41

Consider adding alt+l to list of disabled shortcuts

Alt + l will attempt to load settings from the .xml file.  If no xml file is 
present, all current controllers disappear.  This is behavior is ok if that is 
what the user wants to do, but the key combination alt + l is necessary to 
enter the '@' character on the German mac keyboard.  This makes it impossible 
for someone using a German mac to enter an '@' character in a textfield.

Original issue reported on code.google.com by roycef on 9 Dec 2010 at 7:47

alignValueLabel(int) does not exist

What steps will reproduce the problem?
1. Open ControlP5Snapshot example 
2. Run it


What is the expected output? What do you see instead?

The processing sketch should run... but returns:
"The function alignValueLabel(int) does not exist"

What version of the product are you using? On what operating system?
ControlP5 0.7.2
Processing 1.5
Ubuntu 10.04




Original issue reported on code.google.com by juego.video on 10 Apr 2012 at 11:47

setControlFont crops Textfields unwanted

What steps will reproduce the problem?
1.Add a Textfield.
2.Change the font with setControlFont.


What is the expected output? What do you see instead?
I want to see a different font.
I do see a different font, but the text in the Textfield is cropped


What version of the product are you using? On what operating system?
controlP5_0.5.4 on Mac osx 10.7.2




Original issue reported on code.google.com by [email protected] on 7 Nov 2011 at 10:13

Implement Range.setArrayValue

What steps will reproduce the problem?
Range.setArrayValue(new float[]{(float)1.f,(float)2.f}) 

What is the expected output? What do you see instead?
Does not trigger any events and does not update the internal state of Range.

Please provide any additional information below.
Implement a Range.setArrayValue which calls super.setArrayValue and update()

public void setArrayValue(float[] theArray) {
    super.setArrayValue(theArray);
    update();                  
}


Original issue reported on code.google.com by [email protected] on 25 Dec 2011 at 12:34

Suggestion: override controlP5.addSlider() to explicitly create integer sliders

Hi there,

When dealing with controller events, I like to write one big controlEvent() 
function to handle all controllers rather than writing a whole bunch of little 
callbacks whose names are the same as the controller names.

The one time this scheme breaks down is when I want to create a slider that 
controls an integer value. The sliders I get from controlP5.addSlider() will 
always control float values, unless I create a callback for the slider that 
takes an integer for an argument.

I would like to recommend overriding the addSlider() function to create a 
slider for integer values if the arguments for min, max and initial variables 
are all of type 'int'.

Cheers,
Chris

Original issue reported on code.google.com by [email protected] on 17 Nov 2010 at 10:25

label not visible in Knop

What steps will reproduce the problem?
1.  create knop with method addKnob("test", 0, 5, 10, 10, 40);
2.
3.

What is the expected output? What do you see instead?
no label is displayed

What version of the product are you using? On what operating system?
0.5.4 release 10/05/2010 (latest on projekt-homepage)

Please provide any additional information below.
tried setVisible(true) and so on...

Original issue reported on code.google.com by [email protected] on 1 Feb 2011 at 3:55

The function label() does not exist.

What steps will reproduce the problem?
1. Open example for dropdownList
2. On line 90 change println(theEvent.group().value() to 
println(theEvent.group().label()
3.

What is the expected output? What do you see instead?
Should compile and give the label of the selected drop down, instead the error 
"The function label() does not exist." is thrown

What version of the product are you using? On what operating system?
Latest version on MacOSX

Please provide any additional information below.


Original issue reported on code.google.com by [email protected] on 4 Jan 2011 at 3:09

ControlP5 with PeasyCam example blurry with Processing 2.05 alpha

What steps will reproduce the problem?
1. opening the ControlP5 with PeasyCam example in Processing 2.05 alpha

What is the expected output? What do you see instead?
Expected: Sharp buttons, instead blurry Buttons

What version of the product are you using? On what operating system?
Processing 2.05 alpha on Mac OSX 10.7.3

Please provide any additional information below.


Original issue reported on code.google.com by [email protected] on 2 Apr 2012 at 2:26

Attachments:

Latest version can't run in applet, previous version does.

What steps will reproduce the problem?
1. Export to applet any example
2. Run the applet
3. Get NullPointerException error

What is the expected output? What do you see instead?
Working applet.

What version of the product are you using? On what operating system?
Windows 7 64b, Processing 2.0a5, 0.7.2 gives the problem, 0.7.1 don't

Please provide any additional information below.

Original issue reported on code.google.com by [email protected] on 11 Apr 2012 at 8:44

Suggestion: Option to disable contain collapse

What steps will reproduce the problem?
1. A ListBox container has the ability to collapse.
2. There is no way to turn off this feature.

What is the expected output?
I'd like the ability to disable collapsing the ListBox.  I never collapse and 
it just adds confusion for the user if they click it.


What version of the product are you using? On what operating system?
controlP5 5.0, MaxOS X 10.6.4

Original issue reported on code.google.com by [email protected] on 16 Jul 2010 at 4:30

NoSuchMethodException for RadioButton

What steps will reproduce the problem?

1. Run the ControlP5radioButton example or the example sketch below.
2. Press a radio button with the mouse.

--[ EXAMPLE SKETCH BEGIN]---

import controlP5.*;
ControlP5 cp5;

void setup() {
  size(200,200);
  cp5 = new ControlP5(this);
  cp5.addRadioButton("radioButtonName")
  .setPosition(50,50)
  .setSize(100,100)
  .addItem("itemName",0);
}

void draw() {
  background(0);
}

--[ EXAMPLE SKETCH END]---

What is the expected output? What do you see instead?

Although the functionality itself works, you get a NoSuchMethodException in the 
console every time a button is pressed with the mouse. See full error message 
below. The sketch does not crash, but the console gets painted red fast ;-)

What version of the product are you using? On what operating system?

Window XP + Processing 1.5.1 + ControlP5 0.7.2

Please provide any additional information below.

The full console error message is as follows:

java.lang.NoSuchMethodException: ControlP5radioButton.radioButtonName(int)
    at java.lang.Class.getMethod(Class.java:1605)
    at controlP5.RadioButton.controlEvent(Unknown Source)
    at controlP5.Controller.broadcast(Unknown Source)
    at controlP5.Toggle.setState(Unknown Source)
    at controlP5.Toggle.mousePressed(Unknown Source)
    at controlP5.Controller.setMousePressed(Unknown Source)
    at controlP5.ControllerGroup.setMousePressed(Unknown Source)
    at controlP5.ControllerGroup.setMousePressed(Unknown Source)
    at controlP5.ControlWindow.mousePressedEvent(Unknown Source)
    at controlP5.ControlWindow.mouseEvent(Unknown Source)
    at sun.reflect.GeneratedMethodAccessor5.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at processing.core.PApplet$RegisteredMethods.handle(Unknown Source)
    at processing.core.PApplet.handleMouseEvent(Unknown Source)
    at processing.core.PApplet.dequeueMouseEvents(Unknown Source)
    at processing.core.PApplet.handleDraw(Unknown Source)
    at processing.core.PApplet.run(Unknown Source)
    at java.lang.Thread.run(Thread.java:662)

Original issue reported on code.google.com by [email protected] on 22 Apr 2012 at 7:42

ListBox.clear() throws ArrayIndexOutOfBounds

What steps will reproduce the problem?
1. Add to ListBox
2. Call ListBox.clear()

What is the expected output? What do you see instead?
ArrayIndexOutOfBounds

What version of the product are you using? On what operating system?
0.5.4 Windows7

Please provide any additional information below.
Related to previous issue? Seems to be a problem with internal indexes.


Original issue reported on code.google.com by [email protected] on 17 Jan 2012 at 8:13

setLabel for ListBoxItem

What steps will reproduce the problem?
listboxitem1.setLabel("this is my new label");

What is the expected output? What do you see instead?
Set the ListBoxItem label after creation


Please provide any additional information below.

    public void setLabel(String theLabel) {
        name = theLabel;
        text = theLabel;
    }

Original issue reported on code.google.com by [email protected] on 13 Nov 2010 at 2:34

disableShortcuts() and enableShortcuts() doesn't work

Revising the source code I've detected that the boolean values are swaped 

    public void disableKeys() {
-->     isShortcuts = false;
    }

    public void enableKeys() {
-->     isShortcuts = true;
    }

    public void disableShortcuts() {
-->     isShortcuts = true;
    }

    public void enableShortcuts() {
-->     isShortcuts = false;
    }

the deprecated functions still works

I'm using:
 * @modified    10/05/2010
 * @version 0.5.4

Original issue reported on code.google.com by [email protected] on 15 Jul 2011 at 1:28

Not able to access text of ListBoxItem

What steps will reproduce the problem?
1. Add items to ListBox
2. Try to print out the text of the ListBoxItem selected

What is the expected output? What do you see instead?
Able to access the text in the list box.

What version of the product are you using? On what operating system?
0.5.0 / XP64

Please provide any additional information below.

Can you please add public get methods to ListBoxItem, such as getText(), 
getName(), getActive(), getValue()? I'm trying to determine which item was 
selected, and I'd like to be able to print the text of the item selected.

If there are other (better) ways to get the information, please let me know. 
([email protected])

Thanks.

Max



Original issue reported on code.google.com by [email protected] on 2 Sep 2010 at 4:18

Activate Radio Button does not pass correct value

What steps will reproduce the problem?
1.call the RadioButton.activate() method
2.
3.

What is the expected output? What do you see instead?
Expected: the value of that button
Instead: 1.0


What version of the product are you using? On what operating system?

ControlP5 0.5.0
Processing 1.2.1
Mac os X 10.6

Please provide any additional information below.


Original issue reported on code.google.com by [email protected] on 5 Nov 2010 at 1:56

Attachments:

API Incomplete

The API have:
public ControllerInterface[] getControllerList()

But not:
public GroupGroup[] getGroupList()

We need the array of groups for easy operate with them.

What version of the product are you using? On what operating system?
0.5.4 

Thanks!


Original issue reported on code.google.com by [email protected] on 11 Sep 2011 at 1:12

Slider with FLEXIBLE mode OR enabled tick marks can be set at the right value

What steps will reproduce the problem?
1. Run the attached code
2. Moving hours slider copy value to global slider ok
3. Moving global slider don't copy actual value to hours slider

What is the expected output? What do you see instead?
Moving global slider should put the same value in hours slider

What version of the product are you using? On what operating system?
Processing 2.05a, Windows 7 x64, Java 1.6

Please provide any additional information below.
Not enabling tickMarks OR FLEXIBLE mode make things work as expected. Seems 
some kind of rounding problem.

Original issue reported on code.google.com by [email protected] on 23 Apr 2012 at 4:13

Attachments:

PAppletWindow.java dispose() is now public in Processing 1.5.1

Manually compiling against Processing 1.5.1 will produce:

PAppletWindow.java:384: dispose() in controlP5.PAppletWindow cannot override 
dispose() in processing.core.PApplet; attempting to assign weaker access 
privileges; was public

since it's now public:

http://code.google.com/p/processing/source/browse/trunk/processing/core/src/proc
essing/core/PApplet.java#2631

Original issue reported on code.google.com by [email protected] on 12 Jul 2011 at 12:50

Suggestion: Disable ControlBroadcaster

I am a huge fan of ControlP5 but as far as I can tell there is no way to 
disable ControlP5 from throwing exceptions to unrelated errors that are 
triggered by a controller. 

"An error occured while forwarding a Controller event to a function inside your 
program. Please check your code for any possible errors that might occur in 
this method such as e.g. casting errors, potential nullpointers, array 
overflows ... this is most probably not a ControlP5 error. method: " 
theMethod.getName() "exception: " theException);

I often receive this message instead of whatever my ide would normally spit out 
which does not provide the line of code that is causing the error making 
debugging much more difficult, I would really appreciate the ability to disable 
ControlP5 from throwing these exceptions.

Original issue reported on code.google.com by [email protected] on 18 Sep 2011 at 9:30

Textfield crashes application if too much text is entered with custom font

What steps will reproduce the problem?

PFont font = createFont("courier", 15);
cp5.addTextField("part")
.setPosition(20, 200)
.setSize(170, 37)
.setFont(font)
.setFocus(true)
.setColor(color(0))
.setAutoClear(false)
.setGroup(myGroup)
;

Now type in a lot of text, about 40 chars

What version of the product are you using? On what operating system?
0.7.2, Mac OS X

Original issue reported on code.google.com by [email protected] on 25 Apr 2012 at 10:34

calling scrollList's removeItem once removes 2 buttons instead of just 1

What steps will reproduce the problem?
1. create scrollList and add at least 2 buttons with unique names
2. remove the first item you added
3. both buttons are removed

What is the expected output? What do you see instead?
only one button should be removed. the button you want to get rid of is removed 
as well as the button listed below it.

What version of the product are you using? On what operating system?
v0.5.0 on Windows 7

Please provide any additional information below.
I believe you are calling the remove function twice in your source code for 
ScrollList.java:
controllers.get(i).remove();
controllers.remove(controllers.get(i));

Original issue reported on code.google.com by [email protected] on 10 Oct 2010 at 8:25

ListBoxItem color problem if the box does not need scroll

What steps will reproduce the problem?
/**
 * ControlP5 ListBox
 * listBox operates the same way as a scrollList, but
 * is optimized for many items (1000+). using a listBox
 * over a scrollList is recommended
 * by andreas schlegel, 2009
 */

import controlP5.*;

ControlP5 controlP5;

ListBox l;
ListBoxItem li;
int cnt = 0;
void setup() {
  size(400,400);
  frameRate(30);
  controlP5 = new ControlP5(this);
  l = controlP5.addListBox("myList",100,100,200,10);
  l.setItemHeight(15);
  l.setBarHeight(15);

  l.captionLabel().toUpperCase(true);
  l.captionLabel().set("something else");
  l.captionLabel().style().marginTop = 3;
  l.valueLabel().style().marginTop = 3; // the +/- sign
    l.setColorBackground(color(255,128));
  l.setColorActive(color(0,0,255,128));

  l.setHeight(120);
  l.setWidth(120);
  //l.setBackgroundColor(color(100,0,0));
  for(int i=0;i<80;i++) {
    li = l.addItem("item "+i,i);
    li.setColorBackground(color(random(128,255),0,0,128));
  }

l = controlP5.addListBox("myList2",250,100,0,10);
  l.setItemHeight(15);
  l.setBarHeight(15);

  l.captionLabel().toUpperCase(true);
  l.captionLabel().set("something else");
  l.captionLabel().style().marginTop = 3;
  l.valueLabel().style().marginTop = 3; // the +/- sign
    l.setColorBackground(color(255,128));
  l.setColorActive(color(0,0,255,128));

  l.setHeight(120);
  l.setWidth(120);
  //l.setBackgroundColor(color(100,0,0));
  for(int i=0;i<5;i++) {
    li = l.addItem("item "+i,i);
    li.setColorBackground(color(random(128,255),0,0,128));
  }

}

void keyPressed() {
  if(key=='1') {
    // set the height of a listBox should alwyays be a multiple of itemHeight
    l.setHeight(210); 
  } 
  else if(key=='2') {
    // set the height of a listBox should alwyays be a multiple of itemHeight
    l.setHeight(120);
  }
  else if(key=='i') {
    // set the height of a listBoxItem, should alwyays be a fraction of the listBox
    l.setItemHeight(30); 
  } 
  else if(key=='u') {
    // set the height of a listBoxItem, should alwyays be a fraction of the listBox
    l.setItemHeight(10);
    l.setBackgroundColor(color(100,0,0));
  } 
  else if(key=='a') {
    int n = (int)(random(100000));
    l.addItem("item "+n, n);
  } 
  else if(key=='d') {
    l.removeItem("item "+cnt);
    cnt++;
  }
}

void controlEvent(ControlEvent theEvent) {
  // ListBox is if type ControlGroup.
  // 1 controlEvent will be executed, where the event
  // originates from a ControlGroup. therefore
  // you need to check the Event with
  // if (theEvent.isGroup())
  // to avoid an error message from controlP5.

  if (theEvent.isGroup()) {
    // an event from a group e.g. scrollList
    println(theEvent.group().value()+" from "+theEvent.group());
  }
}

void draw() {
  background(128);
  // scroll the scroll List according to the mouseX position
  // when holding down SPACE.
  if(keyPressed && key==' ') {
    //l.scroll(mouseX/((float)width)); // scroll taks values between 0 and 1
  }
  if(keyPressed && key==' ') {
    l.setWidth(mouseX);
  }
}

What is the expected output? What do you see instead?
The last item on the right hand list should be a random red, not gray.

What version of the product are you using? On what operating system?
0.5.4

Please provide any additional information below.


Original issue reported on code.google.com by [email protected] on 12 Nov 2010 at 3:40

[BUG ]NullPointerException when loading chart

This sketch produces NullPointerException when loading the chart controller:

What is the expected output? What do you see instead?

28-sep-2011 16:19:21 controlP5.ControlP5 load
INFO: loading controlP5.xml
28-sep-2011 16:19:21 controlP5.ControlP5IOHandler parse
GRAVE: Unable to parse file. make sure the file exists. 
java.lang.NullPointerException
java.lang.NullPointerException
    at controlP5.ControlP5IOHandler.parseController(Unknown Source)
    at controlP5.ControlP5IOHandler.parse(Unknown Source)
    at controlP5.ControlP5.load(Unknown Source)
    at ControlP5chart_test.keyPressed(ControlP5chart_test.java:42)
    at processing.core.PApplet.handleKeyEvent(PApplet.java:1996)
    at processing.core.PApplet.dequeueKeyEvents(PApplet.java:1979)
    at processing.core.PApplet.handleDraw(PApplet.java:1643)
    at processing.core.PApplet.run(PApplet.java:1530)
    at java.lang.Thread.run(Thread.java:680)

What version of the product are you using? On what operating system?
0.5.4 in Snow leopard

The Sketch demostrating bug:

//################
import controlP5.*;
ControlP5 controlP5;
Chart myChart;

void setup() {
  size(600, 400);
  controlP5 = new ControlP5(this);
  myChart = controlP5.addChart("Hello", 20, 20, 400, 100);
}

void draw() {
  background(0);
}

void keyPressed() {
  if (key=='s') {
    controlP5.save();
  }
  if (key=='l') {
    controlP5.load("controlP5.xml");
  }
}
//################



Original issue reported on code.google.com by [email protected] on 28 Sep 2011 at 2:23

Attachments:

listBox scrollbar gets messed up if define the height < 10 during creation

What steps will reproduce the problem?
/**
 * ControlP5 ListBox
 * listBox operates the same way as a scrollList, but
 * is optimized for many items (1000+). using a listBox
 * over a scrollList is recommended
 * by andreas schlegel, 2009
 */

import controlP5.*;

ControlP5 controlP5;

ListBox l;
int cnt = 0;
void setup() {
  size(400,400);
  frameRate(30);
  controlP5 = new ControlP5(this);
  l = controlP5.addListBox("myList",100,100,0,0); //Setting the height < 10 creates a scrollbar issue.
  l.setItemHeight(15);
  l.setBarHeight(15);

  l.captionLabel().toUpperCase(true);
  l.captionLabel().set("something else");
  l.captionLabel().style().marginTop = 3;
  l.valueLabel().style().marginTop = 3; // the +/- sign
  //l.setBackgroundColor(color(100,0,0));
  for(int i=0;i<80;i++) {
    l.addItem("item "+i,i);
  }
  l.setColorBackground(color(255,128));
  l.setColorActive(color(0,0,255,128));
  l.setHeight(120);   //Setting the height later does not fix the issue
  l.setWidth(120);

}

void keyPressed() {
  if(key=='1') {
    // set the height of a listBox should alwyays be a multiple of itemHeight
    l.setHeight(210); 
  } 
  else if(key=='2') {
    // set the height of a listBox should alwyays be a multiple of itemHeight
    l.setHeight(120);
  }
  else if(key=='i') {
    // set the height of a listBoxItem, should alwyays be a fraction of the listBox
    l.setItemHeight(30); 
  } 
  else if(key=='u') {
    // set the height of a listBoxItem, should alwyays be a fraction of the listBox
    l.setItemHeight(10);
    l.setBackgroundColor(color(100,0,0));
  } 
  else if(key=='a') {
    int n = (int)(random(100000));
    l.addItem("item "+n, n);
  } 
  else if(key=='d') {
    l.removeItem("item "+cnt);
    cnt++;
  }
}

void controlEvent(ControlEvent theEvent) {
  // ListBox is if type ControlGroup.
  // 1 controlEvent will be executed, where the event
  // originates from a ControlGroup. therefore
  // you need to check the Event with
  // if (theEvent.isGroup())
  // to avoid an error message from controlP5.

  if (theEvent.isGroup()) {
    // an event from a group e.g. scrollList
    println(theEvent.group().value()+" from "+theEvent.group());
  }
}

void draw() {
  background(128);
  // scroll the scroll List according to the mouseX position
  // when holding down SPACE.
  if(keyPressed && key==' ') {
    //l.scroll(mouseX/((float)width)); // scroll taks values between 0 and 1
  }
  if(keyPressed && key==' ') {
    l.setWidth(mouseX);
  }
}


What is the expected output? What do you see instead?
Normal scrollbar

What version of the product are you using? On what operating system?
0.5.4, Max OSX 10.6.5

Please provide any additional information below.
Setting the height to 10 during creation is a work around.


Original issue reported on code.google.com by [email protected] on 12 Nov 2010 at 3:25

ControlP5 ControlKey dislikes Windows Key.

What steps will reproduce the problem?
1. open examples -> extra -> ControlP5key
2. run it
3. Press Windows key, 524...

What is the expected output? What do you see instead?
What is expected is the program continuing to run, Instead throws 
java.lang.ArrayIndexOutOfBoundsException: 524

because windows key = 524.

http://content.gpwiki.org/index.php/Java:Tutorials:Key_States

What version of the product are you using? On what operating system?
processing 1.5.1 & processing 2.0, ControlP5 0.7.2, windows 7.

Please provide any additional information below.

Original issue reported on code.google.com by [email protected] on 20 May 2012 at 8:41

no change value with knop when moving mouse in y-axis

What steps will reproduce the problem?
1. create knop with method addKnob("test", 0, 5, 10, 10, 40);
2. change value by clicking on the knop and holding mouse pressed
3. try change value when moving mouse in y-axis (and mouse pressed)

What is the expected output? What do you see instead?
the value should change when moving mouse in x- and y-axis (like in earlier 
versions)

What version of the product are you using? On what operating system?
0.5.4 release 10/05/2010 (latest on projekt-homepage)

Please provide any additional information below.


Original issue reported on code.google.com by [email protected] on 1 Feb 2011 at 3:59

ListBox doesn't have a setWindow(ControlWindow) method

What steps will reproduce the problem?
1. Trying to create a ListBox in a ControlWindow  
2. Returns "The function setWindow(controlWindow) does not exist.

What is the expected output? What do you see instead?
Would love to be have a Listbox in a Control Window. :)

What version of the product are you using? On what operating system?
ControlP5 0.7.2, Processing 1.5

Please provide any additional information below.
I've seen it is marked @Deprecated in your code, but it works for bangs, 
sliders and number boxes. :)

Original issue reported on code.google.com by juego.video on 22 Apr 2012 at 10:16

Range.setHighValueLabel - feature request

What steps will reproduce the problem?
Range.setValueLabel() only sets the low value label

The setValueLabel is inherited from Controller so I would recommend two new 
methods in Range.

setLowValueLabel - For consistecny. Wrapping the Controller setValueLabel 
setHighValueLabel - setHighValueLabel to set the high value label in Range.



Original issue reported on code.google.com by [email protected] on 23 Dec 2011 at 4:12

ControlFont(PFont) doesn't work with .vlw-initialized PFonts without a corresponding system font

What steps will reproduce the problem?
1. Use Processing's Tools->Create Font... option to make a .vlw file from a 
font installed on the system
2. Uninstall that font from the computer or switch to a computer that doesn't 
have that font (e.g. us a Mac to create a .vlw from Helvetica, then use that 
.vlw on a Windows computer without Helvetica).
3. In a sketch on the system without the font installed, create a PFont with 
that .vlw file
3. Create a new ControlFont using the PFont as a parameter.

What is the expected output? 
The ControlFont initializes successfully and is usable.

What do you see instead?
NullPointerException

What version of the product are you using? On what operating system?
Processing 2.0a5
ControlP5 0.7.2
Reproduced on both Windows 7 and OS X Lion

Please provide any additional information below.
ControlFont.java uses the PFont.getFont() method, which relies on the native 
version of the font being available.

The methods being called on the returned java.awt.Font object (pretty much just 
getSize() from what I can tell), have analogs in the PFont class 
(PFont::getsize()). 
http://processing.googlecode.com/svn/trunk/processing/build/javadoc/core/process
ing/core/PFont.html

Original issue reported on code.google.com by [email protected] on 3 May 2012 at 4:37

ControlP5group example broken in 0.6.12

What steps will reproduce the problem?
1. open ControlP5group example in examples browser
2. hit play

What is the expected output? What do you see instead?
errors about class "Radio" not being found, other errors

What version of the product are you using? On what operating system?
(All platforms), v0.6.12

Please provide any additional information below.

Here is a corrected sketch (adapted from the controlP5radio example:

/**
 * ControlP5 Group
 * by andreas schlegel, 2009
 */
import controlP5.*;

ControlP5 controlP5;

void setup() {
  size(400,400);
  frameRate(30);

  controlP5 = new ControlP5(this);
  ControlGroup l = controlP5.addGroup("myGroup",100,200);
  controlP5.addBang("A-1",0,4,20,20).setGroup(l);
  controlP5.addBang("A-2",30,4,20,20).setGroup(l);
  l.setBackgroundColor(color(255,100));
  l.setBackgroundHeight(150);
  println("the height of controlgroup l: "+l.getBackgroundHeight());

  ControlGroup l2 = controlP5.addGroup("myGroup2",100,40,200);
  l2.activateEvent(true);


  controlP5.addBang("B-1",0,4,20,20).setGroup(l2);
  RadioButton r = controlP5.addRadioButton("radio",100,4);
  addToRadioButton(r,"black",0);
  addToRadioButton(r,"red",1);
  addToRadioButton(r,"green",2);
  addToRadioButton(r,"blue",3);
  addToRadioButton(r,"grey",4);
  r.setColorLabel(0xffff0000);
  r.setGroup(l2);


}

void draw() {
  background(0);
}


void controlEvent(ControlEvent theEvent) {
  if(theEvent.isGroup()) {
    println("got an event from group "+theEvent.group().name()+", isOpen? "+theEvent.group().isOpen());  
  } else if (theEvent.isController()){
    println("got something from a controller "+theEvent.controller().name());
  }
}


void keyPressed() {
  if(key==' ') {
    controlP5.group("myGroup").remove();
  }
}

void addToRadioButton(RadioButton theRadioButton, String theName, int theValue 
) {
  Toggle t = theRadioButton.addItem(theName,theValue);
  t.captionLabel().setColorBackground(color(80));
  t.captionLabel().style().movePadding(2,0,-1,2);
  t.captionLabel().style().moveMargin(-2,0,0,-3);
  t.captionLabel().style().backgroundWidth = 46;
}

Original issue reported on code.google.com by [email protected] on 6 Jan 2012 at 6:30

Slider values are clamped at 100 (default max range?) during initialization

What steps will reproduce the problem?
1. Run the test example below.
2. The only way to set the value is by hardcoding it in a setValue call.

--[ EXAMPLE SKETCH BEGIN]---

import controlP5.*;
ControlP5 cp5;

int sliderValueOne = 211;
int sliderValueTwo = 222;

void setup() {
  size(300, 150);
  cp5 = new ControlP5(this);
  print("I used to be " + sliderValueOne);
  cp5.addSlider("sliderValueOne").setPosition(75, 50).setRange(0, 255).setValue(sliderValueOne);
  cp5.addSlider("sliderValueTwo").setPosition(75, 90).setRange(0, 255).setValue(144).setValue(sliderValueTwo);
  println(", but I got capped at " + sliderValueOne);
  noStroke();
}

void draw() {
  background(sliderValueOne);
  fill(sliderValueTwo);
  rect(25, 25, width-50, height-50);
}

--[ EXAMPLE SKETCH END]---

What is the expected output? What do you see instead?

The expected output is that the Sliders are automatically set to their actual 
initial values, 211 and 222 respectively. However it seems they are clamped at 
the default max range 100. Even when manually using setValue after setRange, it 
is still not possible to set the Sliders to the variable's value. In fact the 
variable's original value is clamped as a result. See the first Slider. The 
only way to set a Slider above 100 is by using setValue() with a hardcoded 
value. See the second Slider.

What version of the product are you using? On what operating system?

Window XP + Processing 1.5.1 + ControlP5 0.7.2

Please provide any additional information below.

Other than that, controlP5 is still awesome ;-)

Original issue reported on code.google.com by [email protected] on 5 May 2012 at 5:07

Sliders with more-to-less arguments don't work

Creating a slider with controls.addSlider("cmd_history", 9, 1, 1, 5, 45, 100, 
10) fails.

What is the expected output? What do you see instead?

I would have expected to have control over the direction of the slider. For 
history control, where higher means older (== steps back), it's more natural to 
have higher values on left and lower values on right.

Thanks,
Charles

Original issue reported on code.google.com by [email protected] on 13 Dec 2011 at 11:33

Slider2D.setLabelVisible() has no effect (always visible). Knob.setLabelVisible() has no effect (always invisible).

What steps will reproduce the problem?
1. ControlP5 controlP5 = new ControlP5(this);
2. controlP5.addSlider2D("slider2D", 0.0, 1.0, 0.0, 1.0, 0.5, 0.5, 50, 50, 100, 
100).setLabelVisible(false);
3. controlP5.addKnob("knob", 0, 1, .5, 100, 100,50).setLabelVisible(true);


What is the expected output? What do you see instead?

Expected output: Slider2D with no visible label, and a Knob with a visible 
label.

Instead: Slider2D with a visible label, and Knob with no visible label.

What version of the product are you using? On what operating system?

controlP5_0.5.4

Please provide any additional information below.


Original issue reported on code.google.com by [email protected] on 12 Nov 2011 at 12:39

ListBox event values are -1 indexed

What steps will reproduce the problem?
if(event.isController() && event.isGroup()){
    if(event.name().equals("Something")) {
        int test = (int)event.group().value());
    }
}

What is the expected output? What do you see instead?
0 indexed values. Instead values are -1 indexed

What version of the product are you using? On what operating system?
0.5.4 Windows7

Please provide any additional information below.
Can be related to previous two issues.

Original issue reported on code.google.com by [email protected] on 17 Jan 2012 at 8:44

ControlP5diyController broken

What steps will reproduce the problem?
1. open examples -> extra -> controlP5diyController
2. run it

What is the expected output? What do you see instead?

the program should run. Instead an error is raised, saying:
"The method register(Object, String, ControllerInterface<?>) in the type 
ControlP5 is not applicable for the arguments(ControlP5diyController,ControlPad)
The offending line is the n. 25:
cp5.register(pad);

What version of the product are you using? On what operating system?
processing 1.5.1, ControlP5 0.7.2, on Ubuntu 11.04

Please provide any additional information below.
It seems that the ControlP5.register() method has changed, and the example has 
not been updated...

Original issue reported on code.google.com by [email protected] on 22 Apr 2012 at 3:38

Changing color for first item in ListBox does not work.

What steps will reproduce the problem?
ListBoxItem lbi1 = ListBox.addItem("Test1", 123); lbi.setColorBackground(5000);
lbi.setColorLabel(6000);
ListBoxItem lbi2 = ListBox.addItem("Test2", 456); lbi2.setColorBackground(7000);
lbi2.setColorLabel(8000);

What is the expected output? What do you see instead?
Color is never changed for first item in ListBox. 

What version of the product are you using? On what operating system?
0.5.4 Windows7

Original issue reported on code.google.com by [email protected] on 17 Jan 2012 at 8:11

Can't change the color of a ListBoxItem

What steps will reproduce the problem?
1. Create a ListBox by addItem(String, index) method
2. Call getItem().setColorBackground() method of the list to try to change the 
color of the background of the ListBoxItem.

What is the expected output? What do you see instead?
Trying to change the color or text of the ListBoxItem doesn't change anything

What version of the product are you using? On what operating system?
0.7.2, windows 7


Original issue reported on code.google.com by [email protected] on 6 May 2012 at 5:12

ListBox and al. could support generics

Hi,
it would be nice to have support of generics to store anything in listboxes, 
radios and non-numeric widgets.

So I can do:
for(File f : myfiles) {
    d.addItem(f.getName(), f);
}

That way we can select objects more easily.
Thanks,

Charles

Original issue reported on code.google.com by [email protected] on 13 Dec 2011 at 11:28

moveTo(Tab) doesn't work for ListBoxes

===========Example:

controller = new ControlP5(this);
controlWindow = controller.addControlWindow("Controls", 100, 100, 500, 500);
controlWindow.hideCoordinates();
Tab aTab = new Tab(controller, controlWindow, "ATab");
Knob aKnob = controller.addKnob("A Knob", 0, 1000, 300, 150, 150, 50);

//Knob will be there
aKnob.moveTo(aTab);

ListBox aListBox = controller.addListBox("a listbox", 50, 50, 200, 200);
aListBox.addItem("Item 1", 1);
aListBox.addItem("Item 2", 2);

//Won't work
aListBox.moveTo(aTab);

//Works
aListBox.moveTo(null, aTab, controlWindow);

===========

This is due to Knob.moveTo(theTab) is Controller.moveTo(theTab), which 
determines the window by asking theTab.

ListBox.moveTo(theTab) is ControllerGroup.moveTo(theTab), which just nulls it.

I would recommend patching ControllerGroup class like so:

===ORIG
    public void moveTo(Tab theTab) {
        moveTo(null, theTab, null);
    }
===ORIG

===PATCH
    public void moveTo(Tab theTab) {
        moveTo(null, theTab, theTab.getWindow());
    }
===PATCH


Original issue reported on code.google.com by [email protected] on 14 May 2011 at 3:41

Font size printed incessantly to console

Run the ControlP5controlFont.pde example with version 0.7.3  and take a look at 
the log console. The font sizes are printed to the console once per frame.

Looks like this is lingering at line 503 of ControlFont.java:
System.out.println(size);

http://code.google.com/p/controlp5/source/browse/trunk/src/controlP5/ControlFont
.java?spec=svn61&r=61#503

Original issue reported on code.google.com by [email protected] on 23 May 2012 at 6:26

ControlP5textarea font error message

What steps will reproduce the problem?
1. add  Tab X
2. add textarea in Tab X
3. textarea roller doesn't work correctly and gives an error message

What is the expected output? What do you see instead?
Tried to look for the default exemple pde, it gives the same error message but 
works more accurate.

error message:
2 déc. 2011 13:32:59 controlP5.BitFontRenderer getWidth
ATTENTION: You are using a character that is not supported by controlP5's 
BitFont-Renderer, you could use ControlFont instead (see the 
ControlP5controlFont example).

What version of the product are you using? On what operating system?
-Processing 1.5.1
-Mac OS X 10.6.8

Please provide any additional information below.


Original issue reported on code.google.com by [email protected] on 2 Dec 2011 at 6:45

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.