Launch of multiple application instances (Mac vs Win)

Paul Dupuis paul at researchware.com
Sun May 8 12:32:01 EDT 2022


Nevermind. I found the "Relaunch Sampler.rev" stack referred to in the 
Dictionary entry and it explains how the message is used further.


On 5/8/2022 12:08 PM, Paul Dupuis via use-livecode wrote:
> 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:
>
> on relaunch
>
>   pass relaunch
>
> end relaunch
>
> Would allow the 2nd (or whatever number) instance to continue to start up
>
>
> 3. Seems obvious as well:
>
> on relaunch
>
>   -- trap the message
>
> end relaunch
>
> 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!
>
>
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your 
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode




More information about the use-livecode mailing list