Page 1 of 1

How to load external stacks or cards into standalone

Posted: Tue Jul 05, 2011 4:56 am
by alex298
Hello,

-----------------------------------
RR Version: Revolution 4.0
-----------------------------------

My application has some cards that need to change often (maybe two or three times per month). I have a question:

I wish to save some stacks or cards externally on my hosting account. Therefore the external stacks or cards will be loaded or imported into the standalone application when it starts.

How can I do that?

Thanks and best regards

Alex

Re: How to load external stacks or cards into standalone

Posted: Tue Jul 05, 2011 10:41 am
by Klaus
Hi Alex,

well, most simple:
...
go stack url "http://www.youryserver.com/folderwith_s ... k.livecode"
if the result <> empty then
## problem
answer "Error:" && the result
end if
...
If that is what you mean?

Best

Klaus

Re: How to load external stacks or cards into standalone

Posted: Wed Jul 06, 2011 8:03 am
by alex298
Hi Klaus,

Thanks! This is exactly what I am looking for:)

I played around with the codes. I noticed that the "imported" stack was a "separate" Main Stack. Is it possible to imported as a sub-Stack? This way there is no need to refer to the stack name when navigate between cards.

Best regards

Alex

Re: How to load external stacks or cards into standalone

Posted: Wed Jul 06, 2011 10:57 am
by Klaus
Hi Alex,

making it a substack does not make sense, since you will not save the stack(s), do you?

And you can still:
...
set the defaultstack to "the one loaded from the net"
## Name of stack NOT the complete URL!
go cd "nice card"
...


Best

Klaus

Re: How to load external stacks or cards into standalone

Posted: Wed Jul 06, 2011 3:07 pm
by alex298
Hi Klaus,

## making it a substack does not make sense, since you will not save the stack(s), do you?

You are absolutely right. I am just curious to know if the loaded stack can be a substack:)

Thanks and best regards