gordy43 / controlp5

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

Create a Slider via annotation causes specified initial value to be overwritten with 100 #82

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
@ControlElement (properties = {"min=65", "max=256", "width=150", "value=196", 
"triggerEvent=1"}, x=10, y=40, label="Max Density")
             int     FINDPOINTS_MAX_DENSITY           = 196;

What is the expected output? What do you see instead?
Slider UI will show "196" as the value, actual value of FINDPOINTS_MAX_DENSITY 
variable will be 100.

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

Please provide any additional information below.
Watching the output of the below code, I see the variable is initially set to 
196 correctly, but gets overwritten.

void controlEvent(ControlEvent theEvent) {
  final String name = theEvent.getController().getName();
  println("Control event from: " + name + " value: " + theEvent.getController().getValue());
  println(FINDPOINTS_MAX_DENSITY);
}

Original issue reported on code.google.com by MUUC.Bo...@gmail.com on 21 Aug 2013 at 1:45