|
|
|
05-29-2009, 09:58 AM
|
#1
|
Human being with feelings
Join Date: May 2006
Location: Surrey, UK
Posts: 19,677
|
Sliderchange doesn't change my slider
I have this JS code snippet;
Code:
slider7:0<0,1,1{Off,On}>Enabled ?
...
@block
enabled = abs(enabled-1);
slider7 = enabled;
sliderchange(2^6);
When 'enabled' is set the slider display changes to "On".
When 'enabled' is unset the slider display does not change (but the slider7 value does); it stays at "On".
What am I missing?
__________________
DarkStar ... interesting, if true. . . . Inspired by ...
|
|
|
05-29-2009, 10:51 AM
|
#2
|
Human being with feelings
Join Date: May 2009
Posts: 1,265
|
Quote:
Originally Posted by DarkStar
I have this JS code snippet;
Code:
slider7:0<0,1,1{Off,On}>Enabled ?
...
@block
enabled = abs(enabled-1);
slider7 = enabled;
sliderchange(2^6);
When 'enabled' is set the slider display changes to "On".
When 'enabled' is unset the slider display does not change (but the slider7 value does); it stays at "On".
What am I missing?
|
That must be a bug in JesuSonic.
If you make it toggle between the 2nd and 3rd value off the slider7, however, it works correct ... example:
Code:
desc:null
slider7:0<0,2,1{dummy,Off,On}>Enabled ?
@block
slider7 = slider7==1 ? 2:1;
So it really seems that it somehow can _not_ switch to the 1st value of the slider7 (in your case the value 0), it also doesn't work in case of:
Code:
desc:null
slider7:0<1,2,1{Off,On}>Enabled ?
@block
slider7 = slider7==1 ? 2:1;
So in conclusion:
Slider drop down boxes won't actualize if the 1st entry is queried from code.
This should get fixed, since I don't see any way to code around it, except adding an empty (dummy) entry in the drop down box, which might not be intended because it will cause confusion for the user (but might be acceptable for debugging).
|
|
|
05-29-2009, 12:00 PM
|
#3
|
Human being with feelings
Join Date: Mar 2007
Location: Surrey, BC
Posts: 745
|
Yeah, some yahoo asked a VERY SIMILAR question quite a while ago. I think it's an old, old bug.
http://forum.cockos.com/showthread.php?t=28065
(slinks away quickly)
(hope it gets fixed, it would be nice to use)
cheers
|
|
|
05-29-2009, 12:54 PM
|
#4
|
Human being with feelings
Join Date: May 2006
Location: Surrey, UK
Posts: 19,677
|
Thanks guys - that helps, at least until the bug gets fixed.
__________________
DarkStar ... interesting, if true. . . . Inspired by ...
|
|
|
06-02-2009, 04:45 AM
|
#5
|
Human being with feelings
Join Date: Jul 2008
Location: The Netherlands
Posts: 3,645
|
I did some further testing, and the drop down slider does get the value of 0, but it just isn't updated on screen. You can test this by changing slider1 in the following test plugin:
Code:
desc:Test
slider1:0<0,3,1>Master
slider2:0<0,3,1{0,1,2,3}>Slave
slider3:0<0,3,1>Slave's slave
@slider
slider2 = slider1;
sliderchange(slider2);
slider3 = slider2;
sliderchange(slider3);
|
|
|
06-05-2009, 06:11 AM
|
#6
|
Human being with feelings
Join Date: May 2006
Location: Surrey, UK
Posts: 19,677
|
Quote:
Originally Posted by Tale
I did some further testing, and the drop down slider does get the value of 0, but it just isn't updated on screen. [/code]
|
Confirmed, but if you close and re-open the GUI it is refreshed. So it's definitely a JS bug
__________________
DarkStar ... interesting, if true. . . . Inspired by ...
|
|
|
06-08-2009, 08:37 AM
|
#7
|
Human being with feelings
Join Date: Sep 2007
Posts: 522
|
I was going to open a new thread for this. I'm glad there's already one so more people is interested in this being solved.
Here is my old post from the beta bugs threads:
http://forum.cockos.com/showpost.php...9&postcount=68
I hope this gets fixed in the next builds, I want to finish a JS plug with buttons and some dynamic things.
|
|
|
Thread Tools |
|
Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -7. The time now is 12:26 PM.
|