View Full Version : Slider: Howto??
esajesa
November 24th, 2005, 09:34 AM
Hey!
Just how do I make a slider talk to Girder??
I've made a slider with ID tag:
SLIDER:HTPC.MasterVolume,0,0,100,1
And then I added an Execute LUA code(OnRelease) action:
NetRemote.ExecuteAction(-1,0,1,"HTPC.ChangeVolume("..NetRemote.GetVariable('HTPC.MasterVolume')..")")
But it just won't send anything to Girder. What am I doing wrong??
//Jens
Ben S
November 25th, 2005, 06:56 PM
The trick is that a plugin doesn't monitor variables "by default". For the slider thumb, set it's action to "Register Variable For Feedback" in the girder plugin. This will cause NetRemote to send the new value to Girder when it changes.
esajesa
November 25th, 2005, 07:04 PM
Yeah, thanks Ben, I figured that out really late last night! :-)
Is there any way to trigger an action in NR instead?? Thing is I configure Girder instances in lua on my remote(s), my "development" setup is separated from my live environment so to speak.
Perhaps a Register variable.. in the NRBasic instance and then create a variable watcher?
Would that slow down performance a lot?
Ben S
November 25th, 2005, 07:10 PM
You don't need to "register" a variable in NRBasic if you prefer to use Lua. Just add a variable watcher and you're good to go.
I actually prefer the lua way to the plugin specific register.
esajesa
November 25th, 2005, 07:14 PM
yeah, of course, silly me... the variable changes anyways!! Thanks, I think I'll give that a go!
Ben S
November 27th, 2005, 04:55 PM
Not a problem. Good luck!
vBulletin® v3.7.4, Copyright ©2000-2008, Jelsoft Enterprises Ltd.