Page 1 of 1

go stack FTPlocation

Posted: Sun Dec 25, 2016 11:04 pm
by adventuresofgreg
Hi: Rather than having users manually update their version of my standalone app whenever I issue an update, I want to have them launch the newest version from my FTP server every time they launch the app.

Like this:

In my small standaline program, the button "launch AlgoLab" code:

on mouseUp
put "ftp://" & FTPname & ":" & FTPpass & "@MyDomain.com/www/AL/SpeculatorOREGON.livecode" into FTPlocation
open stack FTPlocation
end mouseUp

This works, but none of the substacks will open from the SpeculatorOREGON.livecode stack (ie: button: "go stack blabla").

Any ideas?

Thanks,
Greg

Re: go stack FTPlocation

Posted: Mon Dec 26, 2016 3:56 am
by shaosean
Try saving the stack to the user's temporary folder and see if that helps..

Re: go stack FTPlocation

Posted: Mon Dec 26, 2016 4:40 pm
by adventuresofgreg
When I save the .livecode file to the local drive, then open it, I have the same problem. No substack will open.

Re: go stack FTPlocation

Posted: Mon Dec 26, 2016 6:19 pm
by FourthWorld
Instead of:

Code: Select all

open stack FTPlocation
...try:

Code: Select all

go url FTPlocation
The URL keyword is needed there.

Also, I'm curious: why FTP instead of HTTP?

Re: go stack FTPlocation

Posted: Mon Dec 26, 2016 6:26 pm
by adventuresofgreg
Thanks Richard. Still does not work. The stack opens fine, but none of the sub stacks will open.

FTP because there is a password protected directory there. I guess I can do the same thing with http?

Re: go stack FTPlocation

Posted: Mon Dec 26, 2016 6:33 pm
by jacque
Are they really substacks, embedded into the main stackfile? It's acting like they aren't and have been separated out into separate files on disk.

Check the standalone settings. There's an option there to make substacks into separate stacks, and that should not be checked in this case.

Re: go stack FTPlocation

Posted: Mon Dec 26, 2016 6:46 pm
by adventuresofgreg
So, the standalone - lets call it the "launcher" is on the users local drive. Launcher opens a native .livecode file from the FTP server. Yes, the .livecode file has proper substacks, and it works fine if compiled as a stanadlone, or when running in native LC. The substacks wont open when this .livecode app is opened by a standalone - weather or not the .livecode was copied from a FTP server, of if the .livecode file was on the users local drive

For example:

in a button in "Launcher" standalone:

put the defaultfolder into DefPlace
Put "/MyApplication.livecode" after defplace
open stack defplace

The stack does open, as expected. But none of the substacks will open from the opened MyApplication.livecode app. However, the substack WILL open if opened from the standalone. Example: If I called "Open MyApplicationSUBSTACK" from a script in the standalone, it will open. If I try to open that same substack from a script in the MyApplication.livecode file, it won't open.

Re: go stack FTPlocation

Posted: Mon Dec 26, 2016 6:54 pm
by adventuresofgreg
oh hang on... I think I figured this out. My standalone was not saved with the SQL database extensions, and the .livecode app uses them. When I save the .livecode app as a standalone, I add the required database extensions, but they wont work if the launcher standalone hasnt been generated with those extensions.

I should be able to open the URL .livecode stack directly from the FTP server now and have it's substacks work. I'll give it a try