LiveCode is the premier environment for creating multi-platform solutions for all major operating systems - Windows, Mac OS X, Linux, the Web, Server environments and Mobile platforms. Brand new to LiveCode? Welcome!
on dologin pstack
put the substacks of this stack after tvar
repeat for each line aLine in tvar
close stack aline
end repeat
close this stack
go stack pstack
end dologin
In development mode this works good. All the substacks close. Once I compile the the stand alone the substacks do not close.
I think we need more information. Anything may be the cause of your problem. It is quite probable that your script is never called. That would mean that the code isn't in the script you posted, but in the script that calls your dologin handler.
Are the substacks visible when you try to close then, or invivisble? How do you check whether they actually close? I'm not sure that it is a good idea to close a stack before the script finishes. What about switching "close this stack" and "go stack pstacka"?
Do you see anything peculiar on screen, which is different in the standalone compared to the IDE?
Best,
Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode
Lets start with the structure of the Application:
Main stack is "Login"
Next main stack is the Application Menu which gets opened if the login is a success.
Login
App Menu
---substack to app menu
---substack to app menu
---substack to app menu
The script is in the App menu
The script does get called because the App Menu Closes
in development all substacks close then the App Menu Closes And the Login stack is Activated as expected. The Application Browser verifies the fact that the App Menu and it's subs close.
In the compiled mode No substacks are closed and the App Menu Closes and the Login is Activated. Leaving orphaned substacks.
The Application setup includes 2 main stacks:
Login and App Menu (with all its substacks). My goal is to close all substacks then close the menu and return to a login.
Are the substacks visible when you try to close them, or invivisble? I'm not sure that it is a good idea to close a stack before the script finishes. What about switching "close this stack" and "go stack pstacka"?
Do you see anything peculiar on screen, which is different in the standalone compared to the IDE?
Best regards,
Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode
Currently the substacks are visible, I did not try them while invisible and I will try changing the order so the App Menu is closed after the login Stack is opened.
Well changing the order does not work in the development mode.
The substacks close, the Login stack flashes and then is gone and the App Stack Remains which means "Close This Stack" closes the current stack of Login.
So I changed it to close stack "MainMenuTree" and I am back to the runs good in development but orphan substacks in standalone.
Do you have *any* script anywhere in your project that is triggered when a stack closes?
Best,
Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode
Obviously, I didn't think of that. I wish we had some sort of checklist for this kind of problems. Anyway, I'm glad you solved it.
Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode
What I was not aware of is the fact that you loose functionality depending on how you setup your standalone applications.
This may be a bug or not. I have not found any documentation on this. I was hoping to add update abilities to the substacks but now it looks like I have to plan on updating the main stack.
These things are important considerations while building an application.
I wouldn't call this a bug. If your scripts call an object, but the object doesn't exist anymore, then it is an error of the programmer, not a RunRev bug. You have to make sure that the objects are available, be it fields, buttons or stacks.
Best,
Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode