Page 1 of 1
[SOLVED] Start using stack vs insert script into back?
Posted: Mon Mar 30, 2020 2:17 pm
by Zax
Hello,
After reading the Dictionary, I can't see significant differences between:
and
Code: Select all
insert the script of stack "myStack" into back
Message
libraryStack doesn't seem to be sent with the
insert the script command. Is there other differences, and what is the best solution to use a stack's script as library?
Thank you.
Re: Start using stack vs insert script into back?
Posted: Mon Mar 30, 2020 2:47 pm
by Klaus
Hi Zax,
yes "librarystack" is only sent to a stack you "start using".
But in the end:
and
Code: Select all
insert the script of stack "myStack" into back
do the same thing.
Best
Klaus
Re: Start using stack vs insert script into back?
Posted: Mon Mar 30, 2020 6:33 pm
by jacque
There are slight differences, but the two are mostly similar. Back in MetaCard days, scripts inserted into back got messages after the home stack while stacks in use (libraries) got messages just before it. That may have changed by now. The other difference, still true today, is that insertion is silent, but in-use stacks receive a "librarystack" message when they are put in use. You can do any initialization there if needed, and is how a library stack can respond when used as a CGI on a server.
Other than that they behave very much alike.
Re: Start using stack vs insert script into back?
Posted: Tue Mar 31, 2020 7:12 am
by Zax
Thank you for your answers.
"librarystack" message can be very convenient indeed.