UPDATE: Make stack close itself
bobsneidar at iotecdigital.com
Wed May 21 11:48:41 EDT 2014
Okay it looks like the idle command is not getting passed to the back script for some reason. I have this in a back script:
close stack theStack
put empty into theStack
When script execution terminates, this handler does not get triggered, but if I enter idle in the message window it executes.
On May 21, 2014, at 08:30 , Bob Sneidar <bobsneidar at iotecdigital.com<mailto:bobsneidar at iotecdigital.com>> wrote:
I’m running 6.6.1. I do not have 2 copies open however. The stack is a substack of my main stack. I use stacks as software modules, so to speak, in this application. I hide my mainstack window when I open a substack module. When I close the substack window, my on closeStack handler in the main stack handles showing the mainstack window again.
Now I am trying to implement launching one substack from another, and I only want one substack open at a time. So after opening the second substack, I want the calling stack to close itself. I understand that as long as a script from the calling stack is running, it cannot close, so I issued send in time, but that didn’t work. Then I tried an idle handler and a global. I put the long ID of the stack in the global, so that when the next idle message hits it *should* close the stack, but it doesn’t, which means LC thinks there are resources still in use.
I *did* have one of the scripts open in the script editor, so I will try with the script editor closed. BTW I save the stack before exiting. Is saving the stack a blocking call? In other words, does the script stop while saving the stack, or does it go on from there? If so it may just be a timing issue.
On May 20, 2014, at 22:15 , J. Landman Gay <jacque at hyperactivesw.com<mailto:jacque at hyperactivesw.com><mailto:jacque at hyperactivesw.com>> wrote:
Confounded. Since hardly anyone converts HC stacks any more, I thought it was just something to do with that and I'd live with it. But maybe it's related to your issue. You don't happen to have 2 copies of the stack open, do you? What version of LC are you running?
Jacqueline Landman Gay | jacque at hyperactivesw.com<mailto:jacque at hyperactivesw.com><mailto:jacque at hyperactivesw.com>
HyperActive Software | http://www.hyperactivesw.com<http://www.hyperactivesw.com/>
use-livecode mailing list
use-livecode at lists.runrev.com<mailto:use-livecode at lists.runrev.com>
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
More information about the Use-livecode