Stub Stack

J. Landman Gay jacque at hyperactivesw.com
Mon Jan 19 00:41:54 EST 2015


On 1/18/2015 1:13 PM, Ralph DiMola wrote:
> What is the best way to pass data the main stack?
> The stub stack show a splash screen then does a "Go Stack
> mainstack.livecode" and then closes itself. I could write text file in the
> stub and read it in from the main stack, but is there a better way to do
> this?

If the stub is a standalone it never really closes because it's running 
everything. If it's a regular stack running in the IDE, just make sure 
destroystack is set to false so that when it closes it is still in RAM.

Put a function into the stub stack script that returns the text you 
need. In the main running stack, call the function when you need to 
retrieve the text.

You can either put the stub stack script in use, or just call the 
function from the main stack using this syntax:

  put value("retrieveText()",stack "stub") into tText

where "retrieveText" is the name of the function in the stub stack.

-- 
Jacqueline Landman Gay         |     jacque at hyperactivesw.com
HyperActive Software           |     http://www.hyperactivesw.com




More information about the use-livecode mailing list