I want to go from a substack to another while my app is running.
I know that the related commands are "close stack", "open stack", "go stack", "set the defaultStack to".
But my app doesn't react any of these commands while running.
What is the correct way to do this?
Here is some background explanation:
I use 4 different substacks, namely:
* forRetinaV
* forRetinaH
* forNonRetinaV
* forNonRetinaH
{V for Vertical & H for Horizontal}
On startup, it's not a problem.
If the device has a retina display, I choose the substack "forRetina" by a special handler;
and if the device has a standard display, I choose the substack "forNonRetina".
Here is my handler:
Code: Select all
on preOpenStack
.
..
...
determineTheStack tDeviceType
...
..
.
end preOpenStack
on determineTheStack pDeviceType
switch pDeviceType
case "simulatorDemo"
close stack "myMainStack"
go stack "forNonRetinaV"
set the defaultStack to "forNonRetinaV"
break
case "nonRetinaScreen"
iphoneSetAllowedOrientations "portrait"
close stack "myMainStack"
go stack "forNonRetinaV"
set the defaultStack to "forNonRetinaV"
break
case "retinaScreen"
iphoneSetAllowedOrientations "portrait"
close stack "myMainStack"
go stack "forRetinaV"
set the defaultStack to "forRetinaV"
break
end switch
end determineTheStack
While my app is running, i.e. after startup, it doesn't react to these commands.
Any help & idea appreciated.
Thanks,
~ Ender Nafi