on shutdown
Posted: Wed Oct 24, 2012 12:35 am
Hi: I'm having some problem shutting all substacks down on shutdown. I'm not sure why this is happening, but when i shutdown my main stack, the sub stacks don't close. and if I manually shut them down as well, the app stays in memory as a process. This is what i have in the hander "on shutdown". Note - the line "if the name of this stack..." is there because I can shut down the sub stacks and I don't want to shut down the main stack. I only want to shut everything down, and clear memory out if I shut down the main stack called "G59"
on shutdown
if the name of this stack contains "G59" then
close stack "BackTestLookup"
close stack "control panel"
close stack "trading results"
set the destroystack of stack "BackTestLookup" to true
set the destroywindow of stack "BackTestLookup" to true
set the destroystack of stack "control panel" to true
set the destroywindow of stack "control panel" to true
set the destroystack of stack "trading Results" to true
set the destroywindow of stack "trading Results" to true
set the destroystack of this stack to true
set the destroywindow of this stack to true
lock messages
quit
end if
end shutdown
on shutdown
if the name of this stack contains "G59" then
close stack "BackTestLookup"
close stack "control panel"
close stack "trading results"
set the destroystack of stack "BackTestLookup" to true
set the destroywindow of stack "BackTestLookup" to true
set the destroystack of stack "control panel" to true
set the destroywindow of stack "control panel" to true
set the destroystack of stack "trading Results" to true
set the destroywindow of stack "trading Results" to true
set the destroystack of this stack to true
set the destroywindow of this stack to true
lock messages
quit
end if
end shutdown