adding stacks at stack pane.

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

Post Reply
seyabrill
Posts: 5
Joined: Mon Apr 11, 2016 8:47 am

adding stacks at stack pane.

Post by seyabrill » Tue May 03, 2016 2:15 am

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.

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 9742
Joined: Wed May 06, 2009 2:28 pm
Location: New York, NY

Re: adding stacks at stack pane.

Post by dunbarx » Tue May 03, 2016 2:40 am

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

seyabrill
Posts: 5
Joined: Mon Apr 11, 2016 8:47 am

Re: adding stacks at stack pane.

Post by seyabrill » Tue May 03, 2016 7:05 am

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?

jmburnod
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 2718
Joined: Sat Dec 22, 2007 5:35 pm
Location: Genève
Contact:

Re: adding stacks at stack pane.

Post by jmburnod » Tue May 03, 2016 11:51 am

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
https://alternatic.ch

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 9742
Joined: Wed May 06, 2009 2:28 pm
Location: New York, NY

Re: adding stacks at stack pane.

Post by dunbarx » Tue May 03, 2016 2:08 pm

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

seyabrill
Posts: 5
Joined: Mon Apr 11, 2016 8:47 am

Re: adding stacks at stack pane.

Post by seyabrill » Tue May 03, 2016 2:33 pm

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.

Klaus
Posts: 13865
Joined: Sat Apr 08, 2006 8:41 am
Location: Germany
Contact:

Re: adding stacks at stack pane.

Post by Klaus » Tue May 03, 2016 3:20 pm

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

seyabrill
Posts: 5
Joined: Mon Apr 11, 2016 8:47 am

Re: adding stacks at stack pane.

Post by seyabrill » Wed May 04, 2016 7:03 am

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?

Klaus
Posts: 13865
Joined: Sat Apr 08, 2006 8:41 am
Location: Germany
Contact:

Re: adding stacks at stack pane.

Post by Klaus » Wed May 04, 2016 3:12 pm

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

Post Reply

Return to “Getting Started with LiveCode - Complete Beginners”