L_METHOD

Register a list method

WSupported on Windows
USupported on Unix
VSupported on OpenVMS
NSupported in Synergy .NET
xcall L_METHOD(list_id, event_option[, method_name|method_set_id] 
      [, event_option[, method_name|method_set_id]][, ...])

Arguments

list_id

The ID of the list. (n)

event_option

One of the following:

D_LARRIVE

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.

D_LDBLCLK

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.

D_LLEAVE

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.

D_LLOAD

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.

D_LWNDEVENT

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.

method_name

(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)

method_set_id

(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)

Discussion

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