Built-in macros: $profile
The $profile macro is replaced by the name of the profile the code is currently compiled for.
Content
profile‑name
Discussion
This macro can be used to conditionally compile the application. For example, if you want a code section to be executed only when the application is compiled for the profile named Test, you can implement following code at the appropriate location within your component:
$if $profile == Test SomeTextView.String = "TEST MODE!"; SomeObject.PerformSomeOperation(); $endif
When compiling the application for profile with another name (e.g. Target), the above code section is simply ignored. You can also use the macro inside a string literal to format e.g. a trace debug message:
trace "Initializing for the profile version $profile ...";