Open topic with navigation
WTSupported in traditional Synergy on Windows
WNSupported in Synergy .NET on Windows
USupported on UNIX
VSupported on OpenVMS
xcall U_TEXT(channel, facility, message#, text, [length], [no_shortcuts][, parameter, ...])
The channel on which the text library is opened. (n)
The desired facility name. (a)
The number of the desired message. (n)
Returned with the message text. (a)
(optional) Returned with the length of the message text. (n)
(optional) The true/false flag that tells U_TEXT whether to prohibit shortcut text mapping. (n)
(optional) One or more (up to 10) S_BLD parameters. (a or n)
U_TEXT retrieves a text entry from a text message file, optionally performs an S_BLD on it, and optionally replaces menu entry names with their shortcut text. (Note that the S_BLD occurs before the entry name replacement.)
If no parameters are passed, Toolkit will not perform an S_BLD. This avoids errors which might occur if a “%” is in the text.
If no_shortcuts is passed and true, then no mapping of entry names to shortcut text will occur. Otherwise, M_RPLENT is called with the text after any S_BLD.
If length is passed, it is returned with the trimmed length of the resulting text. The text is returned in text.
Text message libraries may be created and maintained by using the Synergy UI Toolkit Control Panel (synctl).
The following example reads the text library which is open on the channel mylib, looking for a text message with facility “GEN” and a message number defined by D_EXITINFO. The text of the message is scanned for any entry names, and if they are found they are replaced by their corresponding shortcut text. The resulting text message is returned in info, and its trimmed length is returned in infolen.
xcall u_text(mylib, "GEN", D_EXITINFO, info, infolen)
In the second example, the text library is searched for message facility “ERR” and message code D_CANTWRITE. The text of this message is passed on to S_BLD, with chnl and %ernum as additional arguments to S_BLD. The text will not be scanned for menu entry replacement. The resulting text is returned in msg, and its trimmed length is returned in msglen.
xcall u_text(mylib, "ERR", D_CANTWRITE, msg, msglen, TRUE, chnl, %ernum)