4D v14.3ST Get expression |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
4D v14.3
ST Get expression
ST Get expression
The ST Get expression command returns the first expression found in the current selection of the styled text field or variable designated by the object parameter. The command returns the label of the expression as it was inserted into the object (for example "mymethod" or "[table1]field1"). The current value of the expression is not returned. Passing the optional * parameter indicates that the object parameter is an object name (string). During execution, if the object has the focus, the command returns the information of the object being edited; if the object does not have the focus, the command returns the information of the object’s data source (variable or field). The optional startSel and endSel parameters designate a selection of text in object. The startSel and endSel values express a plain text selection, without taking into account any style tags that may be present.
4D provides predefined constants so that you can designate the selection limits automatically in the startSel and endSel parameters. These constants are found in the "Multistyle Text" theme:
(*) You must pass an object name in object to be able to use this constant. If you pass a reference to a field or variable, the command is applied to all the text of the object. Note: If startSel is greater than endSel (except when endSel is 0), the command does nothing and the OK variable is set to 0. If there is no expression found in the selection, the command returns an empty string. When there is a double-click event, you check that there is in fact an expression, and if so, you display a dialog where you have retrieved its values so that the user can modify them: Case of You want to execute a 4D method when a user link is clicked: Case of |
PROPERTIES
Product: 4D
HISTORY
SEE ALSO ARTICLE USAGE
4D Language Reference ( 4D v14 R2) |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||