Re: The correct way to quit a Windows standalone

2019-05-23 Thread JJS via use-livecode
If you look at the script i posted before, then you see for windows /T 
and /F and so on.


This will kill the application and all child processes.

On 23-05-19 17:59, Bob Sneidar via use-livecode wrote:

So this seems odd to me. If an executable that spawns other processes/threads 
(if that is what a splash stack is doing) quits, Windows should also terminate 
the processes/threads.

I suppose, from reading various email posts here that there are different ways 
to implement a splash screen. As I mentioned before, I have a stack I call 
Splash, which is NOT the Mainstack (because I have code in the *actual* 
mainstack along with properties etc. that everything else depends on). In the 
Stack Files I have added the *actual* Mainstack which contains substacks.

The splash stack simply hides itself after a few seconds and some eye candy, 
then opens the mainstack which gets the ball rolling. It's closing the 
Mainstack (which has code to close the substacks first) which was causing 
Windows to toss the error and strand the Splash exe process, but I think I got 
that sorted out.

Apparently another way some do it is to make the Splash Stack the Mainstack. 
The reason I do not do this is because I use the splash stack for multiple 
projects, and I don't want to have to pry the splash stack out of a project in 
order to save it as something else to use in that project.

I suppose a third way would be to have the splash stack a substack of the 
mainstack, although I don't see the advantage in this.

Bob S



On May 23, 2019, at 08:38 , J. Landman Gay via use-livecode 
 wrote:

It's not just fonts, anything that's still in use needs to be removed. Fonts, 
stacks in use, open processes, com ports, sockets, etc. Basically you need to 
shut down everything the stack opened.
--
Jacqueline Landman Gay | jac...@hyperactivesw.com


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: The correct way to quit a Windows standalone

2019-05-23 Thread Bob Sneidar via use-livecode
So this seems odd to me. If an executable that spawns other processes/threads 
(if that is what a splash stack is doing) quits, Windows should also terminate 
the processes/threads. 

I suppose, from reading various email posts here that there are different ways 
to implement a splash screen. As I mentioned before, I have a stack I call 
Splash, which is NOT the Mainstack (because I have code in the *actual* 
mainstack along with properties etc. that everything else depends on). In the 
Stack Files I have added the *actual* Mainstack which contains substacks. 

The splash stack simply hides itself after a few seconds and some eye candy, 
then opens the mainstack which gets the ball rolling. It's closing the 
Mainstack (which has code to close the substacks first) which was causing 
Windows to toss the error and strand the Splash exe process, but I think I got 
that sorted out. 

Apparently another way some do it is to make the Splash Stack the Mainstack. 
The reason I do not do this is because I use the splash stack for multiple 
projects, and I don't want to have to pry the splash stack out of a project in 
order to save it as something else to use in that project. 

I suppose a third way would be to have the splash stack a substack of the 
mainstack, although I don't see the advantage in this. 

Bob S


> On May 23, 2019, at 08:38 , J. Landman Gay via use-livecode 
>  wrote:
> 
> It's not just fonts, anything that's still in use needs to be removed. Fonts, 
> stacks in use, open processes, com ports, sockets, etc. Basically you need to 
> shut down everything the stack opened.
> --
> Jacqueline Landman Gay | jac...@hyperactivesw.com


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: The correct way to quit a Windows standalone

2019-05-23 Thread Paul Dupuis via use-livecode

Actually, this all seems like a Windows "bug" to me.

A language like LiveCode, should, if I script 'quit', do exactly that - 
quit. If there are any open anythings preventing that, the engine should 
shut them all down for us.


Now as a software developer, I agree that good programming practice is 
for the developer's code to close out anything they started or opened 
explicitly. But the spirit of LiveCode is to be forgiving and easy for 
non-programmers to make use of and that seems to me that it should clean 
up for us if we don't.



On 5/23/2019 11:38 AM, J. Landman Gay via use-livecode wrote:
It's not just fonts, anything that's still in use needs to be removed. 
Fonts, stacks in use, open processes, com ports, sockets, etc. 
Basically you need to shut down everything the stack opened.

--
Jacqueline Landman Gay | jac...@hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
On May 23, 2019 8:14:59 AM Paul Dupuis via use-livecode 
 wrote:



If it is a requirement for any loaded fonts to be unloaded from memory
for a Standalone to actually quit under Microsoft Windows then a bug
should be entered at https://quality.livecode.com/ to update the
Dictionary entries for:

closeStackRequest
shutDownRequest
quit
start using font
stop using font

To note that any loaded font resources must be unloaded to allow a
Windows standalone to properly exit.


On 5/23/2019 10:41 AM, Eller, Roger via use-livecode wrote:
I do this to cleanly exit my Windows standalone, which is a 
splashscreen stack.


Because I have used a couple of fonts that I keep with the 
standalone, I have to STOP USING them, else the process will still 
continue to run.


This handler is in my visible stack, not in the standalone 
splashscreen stack.



on closeStackRequest

    set the itemDel to "/"

    put item 1 to -2 of the effective filename of this stack &     
"/Resources/TrajanPro" into tPath


    put quote & tPath & "/TrajanPro-Regular.otf" & quote into 
tTrajanProRegular


    put quote & tPath & "/TrajanPro-Bold.otf" & quote into 
tTrajanProBold


    stop using font file tTrajanProRegular

    stop using font file tTrajanProBold

    close this stack

    quit

end closeStackRequest


~Roger

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your 
subscription preferences:

http://lists.runrev.com/mailman/listinfo/use-livecode




___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your 
subscription preferences:

http://lists.runrev.com/mailman/listinfo/use-livecode





___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your 
subscription preferences:

http://lists.runrev.com/mailman/listinfo/use-livecode




___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Re: The correct way to quit a Windows standalone

2019-05-23 Thread J. Landman Gay via use-livecode
It's not just fonts, anything that's still in use needs to be removed. 
Fonts, stacks in use, open processes, com ports, sockets, etc. Basically 
you need to shut down everything the stack opened.

--
Jacqueline Landman Gay | jac...@hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
On May 23, 2019 8:14:59 AM Paul Dupuis via use-livecode 
 wrote:



If it is a requirement for any loaded fonts to be unloaded from memory
for a Standalone to actually quit under Microsoft Windows then a bug
should be entered at https://quality.livecode.com/ to update the
Dictionary entries for:

closeStackRequest
shutDownRequest
quit
start using font
stop using font

To note that any loaded font resources must be unloaded to allow a
Windows standalone to properly exit.


On 5/23/2019 10:41 AM, Eller, Roger via use-livecode wrote:

I do this to cleanly exit my Windows standalone, which is a splashscreen stack.

Because I have used a couple of fonts that I keep with the standalone, I 
have to STOP USING them, else the process will still continue to run.


This handler is in my visible stack, not in the standalone splashscreen stack.


on closeStackRequest

set the itemDel to "/"

put item 1 to -2 of the effective filename of this stack & 
"/Resources/TrajanPro" into tPath


put quote & tPath & "/TrajanPro-Regular.otf" & quote into tTrajanProRegular

put quote & tPath & "/TrajanPro-Bold.otf" & quote into tTrajanProBold

stop using font file tTrajanProRegular

stop using font file tTrajanProBold

close this stack

quit

end closeStackRequest


~Roger

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your 
subscription preferences:

http://lists.runrev.com/mailman/listinfo/use-livecode




___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your 
subscription preferences:

http://lists.runrev.com/mailman/listinfo/use-livecode





___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: The correct way to quit a Windows standalone

2019-05-23 Thread Paul Dupuis via use-livecode
If it is a requirement for any loaded fonts to be unloaded from memory 
for a Standalone to actually quit under Microsoft Windows then a bug 
should be entered at https://quality.livecode.com/ to update the 
Dictionary entries for:


closeStackRequest
shutDownRequest
quit
start using font
stop using font

To note that any loaded font resources must be unloaded to allow a 
Windows standalone to properly exit.



On 5/23/2019 10:41 AM, Eller, Roger via use-livecode wrote:

I do this to cleanly exit my Windows standalone, which is a splashscreen stack.

Because I have used a couple of fonts that I keep with the standalone, I have 
to STOP USING them, else the process will still continue to run.

This handler is in my visible stack, not in the standalone splashscreen stack.


on closeStackRequest

set the itemDel to "/"

put item 1 to -2 of the effective filename of this stack & 
"/Resources/TrajanPro" into tPath

put quote & tPath & "/TrajanPro-Regular.otf" & quote into tTrajanProRegular

put quote & tPath & "/TrajanPro-Bold.otf" & quote into tTrajanProBold

stop using font file tTrajanProRegular

stop using font file tTrajanProBold

close this stack

quit

end closeStackRequest


~Roger

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode




___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: The correct way to quit a Windows standalone

2019-05-23 Thread Eller, Roger via use-livecode
I do this to cleanly exit my Windows standalone, which is a splashscreen stack.

Because I have used a couple of fonts that I keep with the standalone, I have 
to STOP USING them, else the process will still continue to run.

This handler is in my visible stack, not in the standalone splashscreen stack.


on closeStackRequest

   set the itemDel to "/"

   put item 1 to -2 of the effective filename of this stack & 
"/Resources/TrajanPro" into tPath

   put quote & tPath & "/TrajanPro-Regular.otf" & quote into tTrajanProRegular

   put quote & tPath & "/TrajanPro-Bold.otf" & quote into tTrajanProBold

   stop using font file tTrajanProRegular

   stop using font file tTrajanProBold

   close this stack

   quit

end closeStackRequest


~Roger

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: The correct way to quit a Windows standalone

2019-05-18 Thread JJS via use-livecode
i use this which works ok on windows but hangs on Macos(when clicking 
the red x, it works when going to quit via the menu, i don't know why)


if the environment is "standalone application" then
  if the platform is "Win32" then
 --added /T and /F, /T Terminates process and any child 
processes started by it, /F Forcefully Terminate process
 put "taskkill.exe" & space & "/F" & space & "/T" & space & 
"/IM" & space & "yoursplshstack.exe" into tCommandToExec

 put shell  (tCommandToExec)
  else
 if the platform is "MacOS" then
    put "osascript -e 'quit app" & quote & "yoursplashstack" & 
quote & "'" into tCommandToExec

    -- of pkill MFS-VendorStart
    put shell (tCommandToExec)
 else
    if the platform is "Linux" then
   put shell("killall yoursplashstack")
    end if
 end if
  end if

the above part is in the on closestack handler of the stack that has 
been opened by the splashstack. something similair i have in the splash 
stack. so it would work whichever stack is closed by the user. i iconify 
the splashstack after a few seconds


Op 18-5-2019 om 01:26 schreef Bob Sneidar via use-livecode:

NVM Apparently I am supposed to use lock messages to force a quit. There may be 
something in my code that is halting the quit process, but I don't really need 
to do any housekeeping, so this works.

Bob S



On May 17, 2019, at 13:37 , Richmond via use-livecode 
 wrote:

As your splash stack is, presumably,either a substack of your main standalone, 
or the main stack itself
I don't think you can exit it without the whole standalone exiting.

So, I suspect, you'll have to find another way of getting the splash stack out 
of the way.

Personally I'd make the splash stack invisible:

on openStack
   set the vis of stack "mySplash" to false
end openStack

or move it off-screen:

on openStack
   set the bottom of stack "mySplash" to -100
end openStack

Richmond.


On 17.05.19 23:27, Bob Sneidar via use-livecode wrote:

Hi all.

I have a splash stach in a Windows Standalone. When I close (or otherwise quit) 
the stack which the splash stack opens (the actual application) I get a runtime 
error, and the Splash process continues to run.

What is the proper way to cleanly exit an app of this nature?

Bob S


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Re: The correct way to quit a Windows standalone

2019-05-17 Thread Bob Sneidar via use-livecode
NVM Apparently I am supposed to use lock messages to force a quit. There may be 
something in my code that is halting the quit process, but I don't really need 
to do any housekeeping, so this works. 

Bob S


> On May 17, 2019, at 13:37 , Richmond via use-livecode 
>  wrote:
> 
> As your splash stack is, presumably,either a substack of your main 
> standalone, or the main stack itself
> I don't think you can exit it without the whole standalone exiting.
> 
> So, I suspect, you'll have to find another way of getting the splash stack 
> out of the way.
> 
> Personally I'd make the splash stack invisible:
> 
> on openStack
>   set the vis of stack "mySplash" to false
> end openStack
> 
> or move it off-screen:
> 
> on openStack
>   set the bottom of stack "mySplash" to -100
> end openStack
> 
> Richmond.
> 
> 
> On 17.05.19 23:27, Bob Sneidar via use-livecode wrote:
>> Hi all.
>> 
>> I have a splash stach in a Windows Standalone. When I close (or otherwise 
>> quit) the stack which the splash stack opens (the actual application) I get 
>> a runtime error, and the Splash process continues to run.
>> 
>> What is the proper way to cleanly exit an app of this nature?
>> 
>> Bob S
>> 
>> 
>> ___
>> use-livecode mailing list
>> use-livecode@lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your subscription 
>> preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
> 
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: The correct way to quit a Windows standalone

2019-05-17 Thread Bob Sneidar via use-livecode
Need a speel chekr. 

I meant to say, "...but it doesn't quit. It tosses an error and the processes 
continues to run. 

Bob S

> On May 17, 2019, at 13:43 , Bob Sneidar via use-livecode 
>  wrote:
> 
> but it doesn't wuit it tosses an error and the precess continues to run.


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: The correct way to quit a Windows standalone

2019-05-17 Thread Bob Sneidar via use-livecode
The Splash Stack has the mainstack in it's stackFiles. The actual mainstack is 
the application the user interacts with. But by the time a standalone is 
created, there are not mainstacks/substacks. 

So the Splashstack is the standalone, which then opens the mainstack and gets 
the ball rolling. Yes I do hide the splash stack, not sure why someone 
wouldn't. When I quit, I am quitting the actual Splash application, but it 
doesn't wuit it tosses an error and the precess continues to run. I will have 
to poke around somehow to figure out why. Curious, the Apple standalone does 
not behave this way, so I don't think it's an error in the code. 

Bob S


> On May 17, 2019, at 13:27 , Bob Sneidar via use-livecode 
>  wrote:
> 
> Hi all. 
> 
> I have a splash stach in a Windows Standalone. When I close (or otherwise 
> quit) the stack which the splash stack opens (the actual application) I get a 
> runtime error, and the Splash process continues to run. 
> 
> What is the proper way to cleanly exit an app of this nature? 
> 
> Bob S
> 
> 
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: The correct way to quit a Windows standalone

2019-05-17 Thread Richmond via use-livecode
As your splash stack is, presumably,either a substack of your main 
standalone, or the main stack itself

I don't think you can exit it without the whole standalone exiting.

So, I suspect, you'll have to find another way of getting the splash 
stack out of the way.


Personally I'd make the splash stack invisible:

on openStack
  set the vis of stack "mySplash" to false
end openStack

or move it off-screen:

on openStack
  set the bottom of stack "mySplash" to -100
end openStack

Richmond.


On 17.05.19 23:27, Bob Sneidar via use-livecode wrote:

Hi all.

I have a splash stach in a Windows Standalone. When I close (or otherwise quit) 
the stack which the splash stack opens (the actual application) I get a runtime 
error, and the Splash process continues to run.

What is the proper way to cleanly exit an app of this nature?

Bob S


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

The correct way to quit a Windows standalone

2019-05-17 Thread Bob Sneidar via use-livecode
Hi all. 

I have a splash stach in a Windows Standalone. When I close (or otherwise quit) 
the stack which the splash stack opens (the actual application) I get a runtime 
error, and the Splash process continues to run. 

What is the proper way to cleanly exit an app of this nature? 

Bob S


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode