Launch of multiple application instances (Mac vs Win)
paul at researchware.com
Sun May 8 12:08:35 EDT 2022
The LC 9.6.7 Dictionary entry to 'relaunch" states:
It can be used in the following three ways:
|1. If the message is passed, then the new instance continues running.
2. If "background" is returned, then the new instance is terminated. 3.
If nothing is returned but the message is not passed, then the new
instance is terminated and the existing instance's "defaultStack" is
made the foreground window.|
If there are no existing instances, the new instance will run.
1. seems pretty straightforward:
Would allow the 2nd (or whatever number) instance to continue to start up
3. Seems obvious as well:
-- trap the message
Here, the message is not passed, so the new instance is terminated and
the "defaultStack" of the existing instance is brought to the foreground
However, I do not understand 2. What the heck does ;If "background" is
returned" mean in the context of this handler? Returned from what? The
only example given is:
onrelaunch pDocument openDocument pDocument endrelaunch
And the Dictionary states that actually multiple parameters can be
passed (for example if multiple documents where dragged onto the app to
launch it). I feel there is something missing in the Dictionary entry!
More information about the use-livecode