Download and run stacks on iOS

Getting into LiveCode for iOS? Ask your questions here.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

ctceismc
Posts: 6
Joined: Wed Jul 20, 2011 2:23 am

Download and run stacks on iOS

Post by ctceismc »

Can you download a remote stack and run it on iOS?
Jellicle
Posts: 453
Joined: Thu Feb 24, 2011 11:07 am

Re: Download and run stacks on iOS

Post by Jellicle »

Yes.
14" MacBook Pro
Former LiveCode developer.
Now recovering.
Dixie
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 1336
Joined: Sun Jul 12, 2009 10:53 am

Re: Download and run stacks on iOS

Post by Dixie »

Jellicle... How ?
Mark
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 5150
Joined: Thu Feb 23, 2006 9:24 pm
Contact:

Re: Download and run stacks on iOS

Post 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
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode
Jellicle
Posts: 453
Joined: Thu Feb 24, 2011 11:07 am

Re: Download and run stacks on iOS

Post 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
Last edited by Jellicle on Mon Sep 05, 2011 6:51 am, edited 1 time in total.
14" MacBook Pro
Former LiveCode developer.
Now recovering.
jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 7423
Joined: Sat Apr 08, 2006 8:31 pm
Contact:

Re: Download and run stacks on iOS

Post 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"
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com
Mark
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 5150
Joined: Thu Feb 23, 2006 9:24 pm
Contact:

Re: Download and run stacks on iOS

Post 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
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode
Klaus
Posts: 14325
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: Download and run stacks on iOS

Post by Klaus »

Hi all,

doesn't this fall into the category "downloading CODE" which was explicitely fobidden by his Steveness?
Mark
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 5150
Joined: Thu Feb 23, 2006 9:24 pm
Contact:

Re: Download and run stacks on iOS

Post by Mark »

Hi Klaus,

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

Kind regards,

Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode
Klaus
Posts: 14325
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: Download and run stacks on iOS

Post by Klaus »

Hi Mark,

hehe :D
Good luck! 8)


Best

Klaus
Dixie
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 1336
Joined: Sun Jul 12, 2009 10:53 am

Re: Download and run stacks on iOS

Post 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
jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 7423
Joined: Sat Apr 08, 2006 8:31 pm
Contact:

Re: Download and run stacks on iOS

Post 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.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com
Mark
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 5150
Joined: Thu Feb 23, 2006 9:24 pm
Contact:

Re: Download and run stacks on iOS

Post 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
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode
jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 7423
Joined: Sat Apr 08, 2006 8:31 pm
Contact:

Re: Download and run stacks on iOS

Post 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.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com
Jellicle
Posts: 453
Joined: Thu Feb 24, 2011 11:07 am

Re: Download and run stacks on iOS

Post by Jellicle »

Dixie wrote: Jellicle, please tell us the secret...
No secret...i just go to the stack :)
14" MacBook Pro
Former LiveCode developer.
Now recovering.
Post Reply