Register a list method

WTSupported in traditional Synergy on Windows
WNSupported in Synergy .NET on Windows
USupported on UNIX
VSupported on OpenVMS
xcall L_METHOD(list_id, event_option[, method_name|method_set_id] 
      [, event_option[, method_name|method_set_id]][, …])



The ID of the list. (n)


One of the following:


Set or clear the arrive method specified with method_name. To clear any arrive method associated with the list, pass D_LARRIVE and omit method_name.


Set or clear the double‑click method specified with method_name. To clear any double‑click method associated with the list, pass D_LDBLCLK and omit method_name.


Set or clear the leave method specified with method_name. To clear any leave method associated with the list, pass D_LLEAVE and omit method_name.


Set or clear the load method specified with method_name. To clear any load method associated with the list, pass D_LLOAD and omit method_name.


Set or clear an event method set specified with method_set_id. To clear any events method set associated with the list, pass D_LWNDEVENT and omit method_set_id.


(optional) The name of a method that L_PROCESS or L_SELECT will call to load new items onto the list, perform arrive or leave processing for a list item, or process double‑click events. Method must either be contained within the current program image or in an ELB that was either linked to or opened with OPENELB. (a)


(optional) The ID for a method set that will process mouse events for the list. Valid only with D_LWNDEVENT. This must be an ID returned from a D_CREATE call to %U_WNDEVENTS. (n)


L_METHOD registers the names of methods (which you have written) with the list processor. Use this routine if you want to do additional processing when the user initiates the specified event. When that event occurs, UI Toolkit will call the method you specify. L_METHOD settings override L_CLASS and .LISTCLASS method settings.

You may specify more than one method in a single L_METHOD call. However, if you omit a method_name or method_set_id argument, you must include a comma placeholder if further method specifications follow. For example, the following specifies a load method and an arrive method and clears any leave method associated with the list. (Note the comma placeholder after D_LLEAVE.)

xcall l_method(lstid, D_LLOAD, "my_loadmethod", D_LLEAVE,, D_LARRIVE,
&     "my_arrivemethod")

On Windows, if you don’t populate the list with the L_PROCESS requests D_LAPPEND or D_LINSERT, you must write load method (and use D_LLOAD to specify that method) if you want scrolling enabled. Additionally, if you are changing the load method and restarting the list (using L_RESTART), you must call L_METHOD first. Unlike UNIX and OpenVMS environments, your load method will be called immediately, rather than on the next call to L_PROCESS, and calling L_METHOD first will not affect the way applications on UNIX or OpenVMS perform.

See also