PDA

View Full Version : toggel issue



mpg732
September 21st, 2009, 10:22 PM
I have a button set to toggel itself. Its my mute button, I have it set to send an IR command through Girder and to toggel the grafic when I click on it. When I first load Netremote, the first time I click on the button it does not toggel. Though the second time I click on it and any time after it toggels. Its only the very first click. Any idea on why?

Rob H
September 22nd, 2009, 08:55 AM
Sounds like something isn't initialised - how are you getting it to toggle?

I assume you're using a NetRemote variable and a state rule of the form


MyVar is 1

in which case adding


NetRemote.SetVariable("MyVar", "0")

to your .lua file should fix it (changing MyVar to the appropriate variable name).

Alternatively you could set the variable from Girder when the NR client connects if you're maintaining the state there.