Open topic with navigation
WTSupported in traditional Synergy on Windows
WNSupported in Synergy .NET on Windows
USupported on UNIX
VSupported on OpenVMS
subroutine IHYPER_METHOD a_inpinfo ,a a_inprec ,a a_methoddata1 ,any . . a_methoddata20 ,any
The structure of input information. (a)
The data_area argument (or data_location argument for I_INPFLD on Windows) passed to the calling input routine. (a)
a_methoddata1 through a_methoddata20
(optional) Up to 20 additional data arguments. (any)
IHYPER_METHOD is a subroutine you write and name when you want your program to perform extra actions when a hyperlink prompt is clicked (on Windows) or the I_HYPER menu entry is signaled for a specific input field.
This subroutine is called by I_INPUT, I_INPFLD, and L_INPUT when a hyperlink method is specified for the current field being processed. You can specify a hyperlink method for the current field by using the HYPERLINK_METHOD qualifier in a .FIELD script command or the D_FLD_HYPERLINK option in I_FLDMOD or IB_FIELD.
On Windows, if a hyperlink method is specified for a field, and the user left-mouse clicks on the field’s prompt, the associated hyperlink method is invoked.
If a menu entry I_HYPER is placed on a menu column and the user selects the menu entry while processing a field that has an associated hyperlink method, the hyperlink method is involved.
Your hyperlink method can be used for a number of things. Primarily, it is used for some form of lookup or presentation of additional information. Your subroutine can use I_FORCE or I_DSPFLD to return data back into the field being processed. If the default type for the field is COPY, any change you make to the data area will affect the default value for the field.
The inpinf.def file defines a_inpinfo. See IARRIVE_METHOD for information.
A_inprec is the record passed to the data_area argument for I_INPUT and L_INPUT and, on Windows, the data_location argument for I_INPFLD. (On UNIX and OpenVMS, this argument is not passed if I_INPFLD is the calling routine.)
A_methoddata1 through a_methoddata20 are up to 20 additional optional arguments that can be passed to I_INPUT, I_INPFLD, or L_INPUT. They are passed, in turn, directly to IHYPER_METHOD. This enables you to communicate additional information to IHYPER_METHOD.
.field department, a30, pos(2, 2), prompt("Department"), fpos(2, 15), - help("h_department"), hyperlink_method("myhyper")
Given the above field definition, the following hyperlink method, “myhyper,” displays additional help for the department field.
subroutine myhyper ; ; Description: Hyperlink prompt method for additional help ; ; Arguments .include "WND:inpinf.def" ;Input information a_inprec ,a ;Input record ; ;Notes: ; This routine assumes that a window exists in the default window ; library with the name "dh_" + field_name. If it does not exist, ; display an error message. .include "WND:tools.def" .align quad record err ,i4 fldnam ,a30 proc fldnam = %i_getstring(inp_wndid, inp_fldnam) xcall u_popup (g_utlib, "dh_" + fldnam,, D_NOBELL, D_ALERT, err) if (err) xcall u_message("More detailed help not available for this field.") xreturn endsubroutine