View Single Post
  #3   Spotlight this post!  
Unread 17-03-2014, 08:51
pblankenbaker pblankenbaker is offline
Registered User
FRC #0868
 
Join Date: Feb 2012
Location: Carmel, IN, USA
Posts: 103
pblankenbaker is a glorious beacon of lightpblankenbaker is a glorious beacon of lightpblankenbaker is a glorious beacon of lightpblankenbaker is a glorious beacon of lightpblankenbaker is a glorious beacon of light
Re: Remap Button Action

In navigating through the source, it does not look like it is possible (at least not easily) to unregister a button handler.

Could you work around this by refactoring your command to take into account the SOME_CONDITION? For example if the difference is only in your execute() method, could you change your command implementation to:

Code:
protected void execute() {
   if (SOME_CONDITION) {
      executeCondition();
   } else {
      executeNormal();
   }
}
Reply With Quote