How Do I Run More than One Interactive Task Simultaneously? (Magic xpa 3.x)
By default, Magic xpa programs run one runtime tree at a time. That is, when you open a program from a menu, any other runtime tree that happens to be open will be automatically closed. The program call other tasks, but the tasks work in a hierarchical tree fashion. You can use global events to bring up tasks that are not in the hierarchy, and they will run simultaneously with the main task. However, you cannot keep the same program open with multiple windows.
However, you can make your programs run in true parallel mode. When the programs are running in parallel, as shown above, each one can start its own hierarchical tree, or call more parallel programs.
Each parallel program has a unique Context ID, which is an automatically-assigned 15-digit number in an alpha field (you can rename it if you want: see How Do I Set a Different Name for the Current Context?).
In our example, we have Pgm A, which is called three times. Whether it is called from the menu or from another program, it has a unique ID and runs independently of the other windows.
Here is how to make a task run in parallel:
-
Go to Task Properties (Ctrl+P).
-
Click on the Advanced tab.
-
Check the Parallel execution box.
Now the program will run in parallel.
When the program runs in parallel, you have some other options about how it runs. You can read more about these in How Do I Control the Initialization of a Parallel Task?.
The Online Samples project (program MT01)