Quote:
Originally Posted by MrRoboSteve
one idea we were investigating was swapping the command associated with a button by calling WhenPressed() to replace the command bound to the button.
|
I tried to accomplish this (in java) by just creating a new button object and calling WhenPressed() on that new object when I wanted to change the command associated with a particular joystick button. It didn't really work out..and I couldn't really make sense of the behavior when testing. I didn't bother deleting (maybe java calls it disposing) the prior objects when creating new ones (since in java there is this magical thing called the garbage collector) but maybe that would have helped. My thread,
http://www.chiefdelphi.com/forums/sh...d.php?t=127920 contains the code I tried to use. I think the ability clear the commands associated with a button would be a useful feature to add. Maybe I will get around to entering an artifact on the FIRST Forge project page