How Do I Call a Program By Its Name? (Magic xpa 2.x)
If you have a program with a public name, you can call the program directly via that name. This is usually not necessary, as you can use the Call Prog operations for most calls.
However, if you have a situation where you want to store the name in a table, this is useful. It’s also useful if you won’t have access to the program while you are coding, because it is in a cabinet file that is only available at runtime.
-
Press F4 to create an operation line.
-
Press C to create a Call line.
-
Type N to select By Name for the call type, or use the pull-down list. Tab.
-
Zoom to access the Call by Name Details dialog box. Zoom from the Public program name field to the expressions list, and type in the name, or select a variable that will contain the name at runtime.
-
If the program you wish to call is in another cabinet file, do the same for the Cabinet file name.
Now, the program named in the variable will be called at runtime.
The Online and Rich Client Samples projects (program EL10 and REL10)