Application.exe is still running after closing
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
Application.exe is still running after closing
I think it may have something to do with loops, I have 2 loops that keep repeating and then waiting minutes before they do stuff again. is there a way to force these to stop when closing the application?
"Det bästa stället att hitta en hjälpande hand är i slutet av din egen arm" förutom här
Re: Application.exe is still running after closing
Hmmm.
Try this. On a new card in a new stack, place a field and a button. In the button script:
If you try to quit LC, you will queue the attempts to do so, and see them all when you hold down the option key. If you include the "with messages", you can quit right away.
Sort of.
Let me know what you think.
Craig Newman
Try this. On a new card in a new stack, place a field and a button. In the button script:
Code: Select all
on mouseUp
repeat until the optionKey is down
put random(999) into fld 1
wait 3 --with messages -- (try this uncommented as well)
end repeat
end mouseUp
Sort of.
Let me know what you think.
Craig Newman
-
- VIP Livecode Opensource Backer
- Posts: 10052
- Joined: Sat Apr 08, 2006 7:05 am
- Contact:
Re: Application.exe is still running after closing
You can kill all pending messages with this:
Code: Select all
on KillAllTimers
repeat for each line tMsg in the pendingMessages
cancel (item 1 of tMsg)
end repeat
end KillAllTimers
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
Re: Application.exe is still running after closing
well that definitely works as expected, When I close the application without pressing the option key, it stays running in the task manager until alt is pressed. However I cant ask the user to never use the alt key, or it might get pressed by accident prematurely stopping the loop. Also there is a 5 minute wait timer. not 3 milliseconds. I really appreciate the response.
"Det bästa stället att hitta en hjälpande hand är i slutet av din egen arm" förutom här
Re: Application.exe is still running after closing
Richard makes an important observation concerning how LC works internally. But this may not help you or your users unless perhaps (untested) a "closeStackRequest" message is trapped and his handler invoked.
I only put in the optionKey thingie so neither of us would get stuck. I never intended it to be used in "production".
This is a case where it may be desirable to rethink methodology. Sometimes, when the kluges get too complicated, it is time to go back a few steps and see if a different approach makes all that go away.
Craig
I only put in the optionKey thingie so neither of us would get stuck. I never intended it to be used in "production".
This is a case where it may be desirable to rethink methodology. Sometimes, when the kluges get too complicated, it is time to go back a few steps and see if a different approach makes all that go away.
Craig