Page 1 of 2

Download and run stacks on iOS

Posted: Sun Sep 04, 2011 4:17 pm
by ctceismc
Can you download a remote stack and run it on iOS?

Re: Download and run stacks on iOS

Posted: Sun Sep 04, 2011 11:04 pm
by Jellicle
Yes.

Re: Download and run stacks on iOS

Posted: Sun Sep 04, 2011 11:56 pm
by Dixie
Jellicle... How ?

Re: Download and run stacks on iOS

Posted: Mon Sep 05, 2011 12:28 am
by Mark
Hi,

AFAIK you can't open another stack in iOS. This means that it is impossible to download and open a stack in iOS.

Kind regards,

Mark

Re: Download and run stacks on iOS

Posted: Mon Sep 05, 2011 6:28 am
by Jellicle
Mark, I currently have an app on the app store that copies a stack from the app bundle to the iOS documents directory, and, having copied it there, navigates to that stack. I can't see why the app couldn't download a stack and then go to it. All that's different is the means of copying the file.

Or am I missing something obvious?


Gerry

Re: Download and run stacks on iOS

Posted: Mon Sep 05, 2011 6:50 am
by jacque
I think it would work. Mobile apps can only have one stack open at a time, but you can go to any stack. I haven't tried it on mobile, but typically you do it this way:

go stack "http://www.mydomain.com/mystack.livecode"

Re: Download and run stacks on iOS

Posted: Mon Sep 05, 2011 9:20 am
by Mark
Hi Jacque,

I tried making a stack with a substack and tested the go stack command on the substack. This didn't work for me.

Kind regards,

Mark

Re: Download and run stacks on iOS

Posted: Mon Sep 05, 2011 10:20 am
by Klaus
Hi all,

doesn't this fall into the category "downloading CODE" which was explicitely fobidden by his Steveness?

Re: Download and run stacks on iOS

Posted: Mon Sep 05, 2011 10:29 am
by Mark
Hi Klaus,

Yes, you're right, but it is still an interesting idea to think about (and try) :-)

Kind regards,

Mark

Re: Download and run stacks on iOS

Posted: Mon Sep 05, 2011 11:09 am
by Klaus
Hi Mark,

hehe :D
Good luck! 8)


Best

Klaus

Re: Download and run stacks on iOS

Posted: Mon Sep 05, 2011 1:57 pm
by Dixie
Hi...

I can't get it to work either... I can download a stack to the 'documents' folder without a problem, but can't 'go stack' from the one that is already displaying on screen to the one that has just been downloaded... and go stack "http://www.mydomain.com/mystack.livecode" doesn't work for me..

Jellicle, please tell us the secret...

be well,

Dixie

Re: Download and run stacks on iOS

Posted: Tue Sep 06, 2011 2:13 am
by jacque
Interesting. The docs specifically say that "go stack" will work. When I get some time I'll test it. You can't use "go stack in window" but a plain "go" is documented to not only be supported, but recommended.

Edited: I got curious so I tried it with a mainstack and a substack. It works fine. The scripts were very simple. A button on the mainstack:

on mouseUp
go stack "mainSub" -- this is the name of the substack
end mouseUp

And a button on the substack:

on mouseUp
go stack "main"
end mouseUp

No problems.

I don't have a stack on my server ready to test with, so that part will have to wait.

Re: Download and run stacks on iOS

Posted: Tue Sep 06, 2011 10:15 am
by Mark
Hi,

Since Jacque says it is working, I decided to do some tests in the simulator. Apparently, leaving out "in the window of" does the trick. I was able to go to a different substack and to load a stack from a server. Still, Apple won't like downloading code.

Kind regards,

Mark

Re: Download and run stacks on iOS

Posted: Tue Sep 06, 2011 6:54 pm
by jacque
Yeah, it's confusing. You can only use "in the window of" in a revlet to go to another stack, and you can't use it at all on mobile. So there are different rules. I'm glad to hear you can download a stack remotely, now I don't have to test it. But you're right the Apple will reject an app for downloading code.

Re: Download and run stacks on iOS

Posted: Tue Sep 06, 2011 11:12 pm
by Jellicle
Dixie wrote: Jellicle, please tell us the secret...
No secret...i just go to the stack :)