Open topic with navigation
WTSupported in traditional Synergy on Windows
WNSupported in Synergy .NET on Windows
USupported on UNIX
VSupported on OpenVMS
subroutine EUTILS_METHOD a_record ,a a_inpinfo ,a a_methoddata1 ,any . . a_methoddata20 ,any
(optional) The data area associated with the input window of the calling program. (a)
(optional) The structure of input information. (a)
a_methoddata1 through a_methoddata20
(optional) Up to 20 additional data arguments. (any)
EUTILS_METHOD is a subroutine that you write and name. You must use E_METHOD to register the name of your subroutine.
The EUTILS_METHOD subroutine is called by UI Toolkit when the user selects a menu entry whose internal name begins with “U_”.
The a_record argument is passed only if EUTILS_METHOD is called from I_INPUT or L_INPUT.
The a_inpinfo argument is passed only if EUTILS_METHOD is called from I_INPUT, I_INPFLD, L_INPUT, or L_INPFLD. The inpinf.def file defines a_inpinfo. See IARRIVE_METHOD for information.
The a_methoddata arguments are passed only if they are passed to the routine within which the EUTILS_METHOD method is called.
UI Toolkit’s default utility processing routine is named TKP_UTILS, which generates the error “Unknown utility entry xxxx received” (where xxxx is the name of a utility entry) if the user selects a U_ menu entry and no overloaded EUTILS_METHOD subroutine is registered.
In the following example, because EUTILS_METHOD is called only when a U_ menu entry is selected, g_entnam will always contain the entry name of a U_ entry. (There’s no need to check g_select.)
After the entry is processed, g_select must be cleared so the menu processing subroutine (M_PROCESS or I_INPUT, for example) will continue as if no menu selection were made. If g_select is true on return, the menu entry is returned to the calling routine.
subroutine my_eutils_method a_record ,a ; optional data area .include "WND:tools.def" proc case g_entnam of begincase "U_COMM ": xcall comment "U_PUZZ ": xcall puzzle "U_SCRPRN ": xcall scrprn endcase else xcall u_message("Unrecognized utility menu entry") clear g_select xreturn