Page 1 of 1

Launching stack on server - launcher password protected

Posted: Fri Jun 13, 2014 10:46 pm
by shawnblc
So I created a stack (launcher stack) to launch another stack (app) on the server.

The launcher stack, if password protected, won't launch the stack on the server. If the password is removed it will.

Can you not password protect your launcher stack?

Re: Launching stack on server - launcher password protected

Posted: Fri Jun 13, 2014 11:49 pm
by FourthWorld
How does one "launch" a stack on a server?

Re: Launching stack on server - launcher password protected

Posted: Sat Jun 14, 2014 12:11 am
by shawnblc
FourthWorld wrote:How does one "launch" a stack on a server?
Why are you messing with me? You probably don't drink, but I'm going to ask you anyway. Are you drinking? :P

Perhaps I should've worded my question a little different to incorporate the correct lingo.

Code: Select all

    go stack url "http://yourdomain.com/practice/stack.livecode"

Re: Launching stack on server - launcher password protected

Posted: Sat Jun 14, 2014 4:07 am
by FourthWorld
shawnblc wrote:
FourthWorld wrote:How does one "launch" a stack on a server?
Why are you messing with me? You probably don't drink, but I'm going to ask you anyway. Are you drinking? :P
I enjoy a single malt now and then, but today it's just Arnold Palmer.

LiveCode Server is increasingly popular, and there are ways to use stacks as libraries on a server, or as daemon processes, or as custom servers under GUIs, and more - with all those options I wasn't sure what you were after, but I'm always learning new things people do with LiveCode so it seemed worth asking.

For downloading a file to run on the client it looks like you found it:

Code: Select all

    go stack url "http://yourdomain.com/practice/stack.livecode"
That's a very, very useful thing. Most of the work I've doing right now is with downloaded stacks in client-server setups. I'm surprised more people don't use it more often; few things are this easy and powerful at the same time.

Re: Launching stack on server - launcher password protected

Posted: Sat Jun 14, 2014 6:11 am
by shawnblc
Awesome Richard. Thanks for all you do.

Re: Launching stack on server - launcher password protected

Posted: Sat Jun 14, 2014 3:33 pm
by FourthWorld
I've found it wonderfully convenient to take advantage of LC's built-in gzip compression with downloaded stack files.

Here's a handler that will handle both compressed and uncompressed stacks, if the compressed ones have a file name ending in ".gz":

Code: Select all

on mouseUp
   GoStack "http://www.fourthworld.net/revnet/devolution/4W_gzipper.mc.gz"
end mouseUp


on GoStack pURL
   put url pURL into tStackData
   -- Try to decompress .gz files:
   if char -3 to -1 of pURL = ".gz" then
      try 
         put decompress(tStackData) into tStackData
      catch tErr
         answer "Corrupted gzip data in URL "&quote& pURL &quote
         exit to top
      end try
   end if
   --
   go stack tStackData
end GoStack
The URL there may also be of interest: it's a simple LC stack I keep in my Plugins folder that will compress any file dropped onto it, and add a .gz suffix to the compressed copy.

Re: Launching stack on server - launcher password protected

Posted: Sat Jun 14, 2014 7:50 pm
by Simon
Ok, now I'm confused even more;
The URL there may also be of interest: it's a simple LC stack I keep in my Plugins folder that will compress any file dropped onto it, and add a .gz suffix to the compressed copy.
So you are running a stack ON a server? Something like

Code: Select all

<lc? on dragDrop
   compress the dragData["files"]
   pass dragDrop
end dragDrop ?>
Is that true?

Simon

Re: Launching stack on server - launcher password protected

Posted: Sat Jun 14, 2014 9:12 pm
by FourthWorld
I can't imagine how one would get a server to emulate a drag. The utility at the URL I posted was just for compressing stacks locally before posting them to the server for others to download.

Re: Launching stack on server - launcher password protected

Posted: Sat Jun 14, 2014 9:58 pm
by Simon
Oh OK!
Thought there was a miracle happening.
:)

Simon