Old 02-25-2011, 05:58 AM   #1
Adam Fulara
Human being with feelings
 
Adam Fulara's Avatar
 
Join Date: Jan 2011
Posts: 48
Default Q: Call @slider after change position

Is there a method for calling @slider after change slider position in JS?

I mean:
Code:
@slider
slider2=slider1;

@gfx
mouse_cap ? slider1=6; //now I want to have slider2 == 6 too.
I tried sliderchange and slider_automate. Still nothing.
__________________
http://adam.fulara.com/software
Guitar and Midi stuff
Adam Fulara is offline   Reply With Quote
Old 02-25-2011, 06:27 AM   #2
DarkStar
Human being with feelings
 
DarkStar's Avatar
 
Join Date: May 2006
Location: Surrey, UK
Posts: 19,677
Default

Code:
@gfx
mouse_cap ? (
    slider1=6; 
    slider2=6;
    );
__________________
DarkStar ... interesting, if true. . . . Inspired by ...
DarkStar is offline   Reply With Quote
Old 02-25-2011, 08:48 AM   #3
Adam Fulara
Human being with feelings
 
Adam Fulara's Avatar
 
Join Date: Jan 2011
Posts: 48
Default

ok, problem is, that @slider have about 20 code lines.

I would prefer do not copy paste this 20 lines every time, I change "slider" variable. If I will change something in "@slider" section then, I will have to change that in every pasted block.

EDIT:
OK I got simple solution. In every block I need to call @slider I placed that 20 lines of "@slider" code at the end in "if" section ( ?: ), and before that I made variable "change_sliders" which is "1" only if sliders need to be changed.

BTW shouldn't it be in "sliderchange" to call the "@slider" section? Or maybe only as an option of sliderchange?
__________________
http://adam.fulara.com/software
Guitar and Midi stuff

Last edited by Adam Fulara; 02-27-2011 at 06:16 AM.
Adam Fulara is offline   Reply With Quote
Old 02-27-2011, 12:06 PM   #4
IXix
Human being with feelings
 
Join Date: Jan 2007
Location: mcr:uk
Posts: 3,889
Default

sliderchange() just forces the GUI to redraw the sliders. It would make more sense if sliderchange(n) changed the value and updated the display but hey, that's just how it isn't.
IXix is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 08:10 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.