Go to Post Who cares about having a boyfriend when I have my robot? - Jaine Perotti [more]
Home
Go Back   Chief Delphi > Technical > Programming > C/C++
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #4   Spotlight this post!  
Unread 23-03-2014, 19:18
jwakeman jwakeman is offline
Registered User
FRC #0063 (Red Barons)
Team Role: Mentor
 
Join Date: Jan 2011
Rookie Year: 2010
Location: 16510
Posts: 182
jwakeman is just really nicejwakeman is just really nicejwakeman is just really nicejwakeman is just really nicejwakeman is just really nice
Re: How to change command associated with button

Quote:
Originally Posted by MrRoboSteve View Post
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
Reply With Quote
 


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 14:06.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi