Code: Select all
on preOpenStack
if "XMLControl" is not among the lines of the StacksInUse then
if the environment = "development" then
start using stack "../lib/saverXMLControl.livecode"
else
start using stack "saverXMLControl.livecode"
end if
end if
<for each stack that is needed>
end preOpenStack
I have the application on a Mobile device and when the app starts it displays a BLACK screen until the stacks are started and then goes to the first card. The user doesn't know what is going on when the screen is black, so I created a Splash Card to be displayed while the application is initializing.
I moved the code from the preOpenStack to the openCard handler on the splash card and it fails. The application starts, but if I go into the Message Box, none of the stacks are started in the StacksInUse.
If I move the code back to the preOpenStack, everything works.
What is the problem. Shouldn't I be able to start a stack after the Main stack is Open?
I would appreciate any thoughts from the forum.
Thank you in advance.