Open topic with navigation
WTSupported in traditional Synergy on Windows
WNSupported in Synergy .NET on Windows
USupported on UNIX
VSupported on OpenVMS
subroutine EEDTDSP_METHOD a_data ,a a_type ,a a_text ,a a_edit ,a a_inpinfo ,a
The data as stored in the field. (a)
The user_type string specified in the .FIELD USER qualifier. (a)
(optional) The user_text string specified in the .FIELD USER qualifier. (a)
The returned text to be edited. (a)
The structure of input information. (a)
EEDTDSP_METHOD is a subroutine that you write and name. The name of your subroutine is registered with UI Toolkit using the E_METHOD subroutine.
We recommend using an input field edit format method (%IEDITFMT_METHOD) instead of EEDTESP_METHOD. Unlike EEDTDSP_METHOD, your %IEDITFMT_METHOD adds to Toolkit functionality rather than replaces it. %IEDITFMT_METHOD also provides access to the structure defined in inpinf.def and to the 20 optional arguments passed to I_INPUT and L_INPUT. See %IEDITFMT_METHOD for more information.
The UI Toolkit input subroutine calls the EEDTDSP_METHOD subroutine to display the editable contents of a user-type field differently than both the way it is stored and the way EDSPFLD_METHOD displays it (with formatting). If an edit format method is specified for the input field (using %IEDITFMT_METHOD), the edit format method is called after the EEDTDSP_METHOD subroutine. Use EEDTDSP_METHOD if you need the text of user-defined data type fields to display in another way than the way they are stored.
Note that the length of the text passed in a_edit is defined by the input length for the field. It is not limited by either the display length or the view length.
You will never call EEDTDSP_METHOD directly; it is called only by UI Toolkit.
The inpinf.def file defines a_inpinfo. See IARRIVE_METHOD for information.
S/DE Repository allows you to specify a subtype (or class) for user-defined fields. The default subtype is alpha, but you can optionally specify numeric or date. To access this subtype within the Toolkit user-defined processing routines, use the window ID and field number contained within the inputinfo structure (the a_inpinfo argument). Pass these two values to the I_FLDINF subroutine to retrieve the gs_inpfld structure (the controls argument) which contains the gs_class (user subtype) value. For user-defined alpha fields; gs_class = 0; for user-defined numeric fields, gs_class = 1; for user-defined date fields, gs_class = 2.
Although you can manage the display and validation of user-defined fields using EDSPFLD_METHOD and ECHKFLD_METHOD, when the field is edited (with the E_xxx menu entries) the field is treated as alphanumeric. Thus if the storage form of the data differs from the manner in which it was entered, confusion can result. EEDTDSP_METHOD can solve this problem.
Toolkit’s default method is named TKP_EDTDSP and is listed below:
subroutine tkp_edtdsp ; ; Description: ; Format the editable text for a user-defined data type ; ; Arguments: ; a_data ,a ;Data as stored in the field ; a_type ,a ;User-defined data type ; a_text ,a ;(Optional) user text string ; a_edit ,a ;Returned text to be edited ; a_inpinfo ,a ;Input information ; ; Notes: ; ; Overload this routine if you need to have user-defined data types ; display data other than as stored when the user begins to edit the field. ; ; This default version merely moves the stored data into the editing ; buffer. You should retain this functionality for any unknown user data ; types. If you remove the semi-colons which "comment out" the case ; statement, then replace the "MYTYPE" case shown with one or more of ; your own, the "else" on the endcase will handle the default condition. proc ; case a_usertype of ; begincase ; "MYTYPE ": call format_my_type ; endcase ; else a_edit = a_data xreturn endsubroutine
See the ECHKFLD_METHOD Examples for an example that uses ECHKFLD_METHOD, EDSPFLD_METHOD, and EEDTSP_METHOD to validate and display a ZIP Code.