Developer Function Behavior (Magic xpa 3.x)
Tasks or subtasks can refer to any Developer function that is available in the studio task tree of that task. Developer functions specified for the Main Program are available for the entire application.
From the Expression Editor, you can click the Function List to display the list of Developer functions under the Developer category. The help string defined in the Comments box for a selected Developer function appears when the engine parks on the function.
Note:
|
You can define a help string by selecting the Function entry in the Logic Editor, click F12 to open the Comments box, and enter your text string between /* and */.
|
If several Developer functions are given the same name, the name displayed for the scope is used. For example, if you have two Developer functions both called ABC where one function is defined for a subtask and the other is defined for the Main Program, if you are in the subtask, Magic xpa uses the ABC function defined for the subtask. If you are in a program, Magic xpa uses the ABC function defined for the Main Program.
A Developer function overrides a built-in function with the same name only when both functions are specified for the same application, task or subtask level. For example, if you have a Developer function and a built-in function called STR, the user-defined function overrides the Magic xpa function.
Developer functions used in an expression will not be automatically renamed if the function definition is renamed and will not be removed if the function definition is removed. It is the developer’s responsibility to update expressions with Developer functions that have been renamed or removed.
When a function is renamed or removed and there is no other function that carries the previous name, all references to this function in the expression editor of the current task and its subtask will become invalid. The checker catches unidentified operators.
When a function is renamed or removed and there is another function with the same name, all references to the renamed function will refer to the existing function of the same name.
Defining a Developer Function
Developer Functions and Components
Developer Function Runtime Behavior