Page 1 of 1

adding stacks at stack pane.

Posted: Tue May 03, 2016 2:15 am
by seyabrill
Hi all,

I'm having trouble adding stacks to the stack pane of the standalone application settings. I added several stacks but during the build only the first added stack was included. Is there a way to include all my added stacks during the build? I'm using lc 7.1.3 and tried using lc 8.0(rc1). Please help.

Re: adding stacks at stack pane.

Posted: Tue May 03, 2016 2:40 am
by dunbarx
I am languishing in v. 6.

But are you saying that several stack files (files, not just stacks) are listed in the settings, but that these are not included in the standalone itself?

Craig Newman

Re: adding stacks at stack pane.

Posted: Tue May 03, 2016 7:05 am
by seyabrill
I think I did not make it clear, sorry for that.

In the stack pane of the standalone application settings, I added many stacks. The stack list contains my main stack and my added stacks. Let say 3 more stacks are added namely "addedStack1", "addedStack2", "addedStack3". So the list have "mainStack", "addedStack1", "addedStack2" and "addedStack3". Upon saving it as a standalone application, it only build the "mainstack.exe" together with "addedStack1.livecode".

I would to have a build with "mainstack.exe" together with "addedStack1.livecode", "addedStack2.livecode" and "addedStack3.livecode". Can this be done? How?

Re: adding stacks at stack pane.

Posted: Tue May 03, 2016 11:51 am
by jmburnod
Hi seyabrill,
I test standalone with 3 stack files added with v7.06 (OS X) it and it works for me.
In my firs try I got an error because stack names of stacks was same.
Is it the case for you ?
Best regards
Jean-Marc

Re: adding stacks at stack pane.

Posted: Tue May 03, 2016 2:08 pm
by dunbarx
Just to be certain, the stack files are not substacks, correct? Or if they are, the "move into individual stack files" checkbox has been clicked?

Craig

Re: adding stacks at stack pane.

Posted: Tue May 03, 2016 2:33 pm
by seyabrill
Thank you for the replies dunbarx and jmburnod.

@dunbarx: Yup the stack files are not substacks. But I want them to be substacks after the build.

@jmburnod: I'm not so sure what happened but I think it is the way I coded my added stacks. All my added stacks (addedStack1, addedStack2 and addedStack3) have a line of code (set the mainStack of this stack to "mainStack") inside the preopencard message. After deleting the code and save it as Standalone application, it works fine.

Now I'm having problem on how to make the addedstacks; substacks of the mainstack after the build.

Re: adding stacks at stack pane.

Posted: Tue May 03, 2016 3:20 pm
by Klaus
Hi seyabrill,

1. welcome to the forum! :D
seyabrill wrote:Now I'm having problem on how to make the addedstacks; substacks of the mainstack after the build.
2. You can't!

Once a stack is being build as a standalone you cannot add anything to it anymore!
So you need to make all your stacks substacks BEFORE you build a standalone.

Maybe you can use the message "savingstandalone" which is sent to your mainstack right before "a copy!"
of it will be turned into the standalone app.

Pseudocode (!) goes into your mainstack script:

Code: Select all

on savingstandalone

  ## Prevent eventual pre-/openstack/card handler from excecuting
  go stack "addedstack1.livecode"
  set the mainstack of stack "addedstack1" to stack "name of your mainstack here..."
  ## Same for all "addedsubstacks"
  ## ...
end savingstandalone
That should do what you want!


Best

Klaus

Re: adding stacks at stack pane.

Posted: Wed May 04, 2016 7:03 am
by seyabrill
Hi there Klaus,

I did this:

Code: Select all

on savingstandalone
   
   ## Prevent eventual pre-/openstack/card handler from excecuting
   go stack "addedStack1.livecode"
   set the mainstack of stack "addedStack1" to stack "mainstack"
   set the mainstack of stack "addedStack2" to stack "mainstack"
   set the mainstack of stack "addedStack3" to stack "mainstack"
   ## Same for all "addedsubstacks"
   ## ...
end savingstandalone

I place this message inside the mainstack script.
Did I done it correctly?


Is there any option in stack pane at standalone application settings that will make the added stack as substack of the mainstack?

Re: adding stacks at stack pane.

Posted: Wed May 04, 2016 3:12 pm
by Klaus
Hi seyabrill
seyabrill wrote:Hi there Klaus,

I did this:

Code: Select all

on savingstandalone
   
   ## Prevent eventual pre-/openstack/card handler from excecuting
   go stack "addedStack1.livecode"
   set the mainstack of stack "addedStack1" to stack "mainstack"
   set the mainstack of stack "addedStack2" to stack "mainstack"
   set the mainstack of stack "addedStack3" to stack "mainstack"
   ## Same for all "addedsubstacks"
   ## ...
end savingstandalone

I place this message inside the mainstack script.
Did I done it correctly?
yes, looks good, but if your stacks are already open, you can omit the line
...
go stack "addedStack1.livecode"
...
Is there any option in stack pane at standalone application settings that will make the added stack as substack of the mainstack?
No!
Believe me I would have told you! 8)


Best

Klaus