Page 1 of 1

Open substack on lauch

Posted: Sat Oct 17, 2015 2:26 pm
by croivo
Is there any way to first start substack on application launch? By default it opens mainstack...
I'm using Livecode on Windows.

Re: Open substack on lauch

Posted: Sat Oct 17, 2015 2:31 pm
by Klaus
Dobar dan croivo,

hm, not directly, but you can try:
1. hide mainstack on preopenstack
2. open substack
3. close mainstack
4. set visible of (closed) mainstack back to true

Not tested, but sounds doable :D


Best

Klaus

Re: Open substack on lauch

Posted: Sat Oct 17, 2015 2:49 pm
by croivo
Guten Tag Klaus,
I already tried something like that... On preopenstack I added code to close mainstack and open substack... And substack has the button to open mainstack. But when I click on that button, it's not gonna open mainstack because of that code on preopenstack handler on mainstack.
So, to conclude...
I want to open that substack on app launch, than click on button that opens mainstack. Hope I'm clear...

Danke schön :D

Re: Open substack on lauch

Posted: Sat Oct 17, 2015 3:12 pm
by Klaus
I would set a "flag" (variable or custom property) on the first preopenstack
so next time the script will not execute! Know what I mean?

Re: Open substack on lauch

Posted: Sat Oct 17, 2015 8:20 pm
by croivo
Yep... I tried that, but looks like something was interfering my old code in stack, so it didn't work.
Anyway, I copied the substack card in mainstack and mainstack card in substack. And now it's working...