PreviousNext
MenuItemSelected
Help > Custom DPA Handler > Events > MenuItemSelected

This event is raised only at TR-7xG [N] when a menu item from Online or ReadyToBond DPA Menus was selected. The userReg1 variable at the entry contains menu and menu item, that was selected. If the user item is optional and implemented in the Custom DPA Handler the event must return TRUE to indicate OK result of the menu item, otherwise it must return FALSE to indicate error. Predefined macro MakeDMenuAndItem constructs menu&menuItem value. Predefined macros GetDMenu and GetDMenuItem get menu or menu item part from the menu&menuItem value respectively. Menu item action might be executed at this event to find out the its result or it can be executed at the MenuItemFinalize event later, if the result is known.

 

Example

 

static bit startBeamingAtIdle;

 

 

case DpaEvent_MenuItemSelected:

  switch ( userReg1 )

  {

    case MakeDMenuAndItem( DMENU_Online, DMENU_Item_GoBeaming ):

      if ( amIBonded() )

      {

         startBeamingAtIdle = TRUE;

         return TRUE;

      }

      break;

 

    case MakeDMenuAndItem( DMENU_Online, DMENU_Item_User1 ):

      return TRUE;

  }

 

return FALSE;

 

See example CustomDpaHandler-DpaMenu for more details.