Tech Tip: Tip When Using Tokens in Method Editor
PRODUCT: 4D | VERSION: 15.3 | PLATFORM: Mac & Win
Published On: May 25, 2017
While using tokens are great to confirm that the correct command is being used, especially when going between different languages, the case must be considered. When using tokens, the command number must be preceded by a capitol "C" and not a lower case.
For example, the following will not tokenize the command:
$fieldPtr:=Field:c253(1;1) |
While the following will:
$fieldPtr:=Field:C253(1;1) |
This is important to keep in mind when using tokens in string format such as in the case of 4D transformation tags.
For example running the following code:
$test_Incorrect:="<!--#4DEVAL Current time:c178-->" PROCESS 4D TAGS($test_Incorrect;$out1) $test_Correct:="<!--#4DEVAL Current time:C178-->" PROCESS 4D TAGS($test_Correct;$out2) TRACE |
Will result in the following: