Switch case within a hold statement
ryanww
Posts: 196
So I have a block of code that I am using below.. I am unable to activate anything within the hold portion of the button event. I just ended up writing a new button event for the 10 buttons that I have in this situation. Why is it though that it wouldn't work?
Thanks,
Ryan
BUTTON_EVENT [dvTP,0]
{
PUSH:
{
SWITCH (BUTTON.INPUT.CHANEL)
{
CASE 1: { } //DO SOMETHING HERE
}
}
HOLD[20]:
{
SWITCH (BUTTON.INPUT.CHANEL)
{
CASE 1: { } //DO SOMETHING HERE
}
}
}
Thanks,
Ryan
BUTTON_EVENT [dvTP,0]
{
PUSH:
{
SWITCH (BUTTON.INPUT.CHANEL)
{
CASE 1: { } //DO SOMETHING HERE
}
}
HOLD[20]:
{
SWITCH (BUTTON.INPUT.CHANEL)
{
CASE 1: { } //DO SOMETHING HERE
}
}
}
0
Comments
Note: Just to clarify, I *do* know that BUTTON_EVENT[dvTP,0] is perfectly legal.
Pauld
Thanks,
Ryan
J
--John
No, there was nothing mean at all. I actually made a self-depricating joke but then realized that it wasn't directed at me in the first place. So, the joke would then not make sense.
The results of some research using an NI700 on v2.29.218 and NS2 on 2.5.0.163 with a G3 browser panel emulating a touchpanel and also using "Emulate a Device".
Here is the code that illustrates the problem:
The push is fine but the hold sees a value for button.input.channel of 0.
If I push twice within a second, I see an error message on the NI telnet:
"CIpHold::AddHold - Duplicate"
I see a single hold after every push no matter how brief the push.
If I change to
everything is OK.
But that is what I did.
Thanks, Ryan