Old 01-30-2008, 07:35 PM   #1
argee
Human being with feelings
 
Join Date: Mar 2007
Location: Surrey, BC
Posts: 740
Default sliderchange() - does it work?

I've been trying to use the sliderchange function for a GUI I'm working on, but it doesn't seem to have any effect.

If I display the sliders for testing, when I interact with the GUI using the mouse, I see the sliders move but there is no parameter change for the sound. I've tried it with this function in or out with no success.

Has anyone else used it successfully?

Here's some sample code where I want to use it :

mouse_cap > 0 ? (
mouse_x >= 104 && mouse_x <= 272 && mouse_y >= 23 && mouse_y <= 40 ? (
count=0;
while (
(mouse_x >= 104+count*30 && mouse_x <= 124+count*30) ? (
value=count+1;
done == 0 ? (
slider1 < value ? slider1=value : slider1=value-1;
done=1;
);
);
count += 1;
count < 6;
);
mouse_cap==2 ? slider1 = 2;
sliderchange(slider1);
);
);

The only way I can get things to work is to repeat the applicable '@slider' code in the mouse handling event.
argee is offline   Reply With Quote
Old 01-31-2008, 05:05 AM   #2
IXix
Human being with feelings
 
Join Date: Jan 2007
Location: mcr:uk
Posts: 3,379
Default

I noticed that yesterday. It seems that sliderchange() updates the display but doesn't actually execute the @slider code. Not sure if it's always been that way or if it's a bug that's crept in recently.
IXix is offline   Reply With Quote
Old 01-31-2008, 10:46 AM   #3
ph69
Human being with feelings
 
ph69's Avatar
 
Join Date: Jan 2008
Location: Paris (FR)
Posts: 78
Default

That can be problematic.
As I plan to use @gfx and trigger a @slider call when something changed...
Maybe, I have to work my updates in @block and have a trigger-boolean set by the gfx and/or slider section.
ph69 is offline   Reply With Quote
Old 01-31-2008, 11:19 AM   #4
argee
Human being with feelings
 
Join Date: Mar 2007
Location: Surrey, BC
Posts: 740
Default

For now, I've moved all the code in the @slider section to the various mouse-handling code sections within the @gfx section and am using the sliders just to store the values set by the mouse actions - this seems to work OK.

cheers
argee is offline   Reply With Quote
Old 02-01-2008, 04:14 AM   #5
IXix
Human being with feelings
 
Join Date: Jan 2007
Location: mcr:uk
Posts: 3,379
Default

Quote:
Originally Posted by ph69 View Post
Maybe, I have to work my updates in @block and have a trigger-boolean set by the gfx and/or slider section.
Yeah, that's how I've been getting around it.
IXix is offline   Reply With Quote
Old 10-16-2019, 01:26 PM   #6
Fabian
Human being with feelings
 
Fabian's Avatar
 
Join Date: Sep 2008
Location: Sweden
Posts: 5,498
Default

This seems to still be the case!

Calling
Code:
sliderchange(slider1)
doesn't do anything to me. Assigning slider1 new values in my gfx code, updates the GUI but does not effect the sliderchange.

Luckily, now we can define functions, so I defined one function with all the slider changes, and call that from both the gfx code and @slider.
__________________
// MVHMF
I never always did the right thing, but all I did wasn't wrong...
Fabian is offline   Reply With Quote
Old 10-18-2019, 11:17 AM   #7
IXix
Human being with feelings
 
Join Date: Jan 2007
Location: mcr:uk
Posts: 3,379
Default

Ha, would be nice to know if this is a bug or not!
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:27 AM.


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