Launching stack on server - launcher password protected

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

Post Reply
shawnblc
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 342
Joined: Fri Jun 01, 2012 11:11 pm

Launching stack on server - launcher password protected

Post by shawnblc » Fri Jun 13, 2014 10:46 pm

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?

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10053
Joined: Sat Apr 08, 2006 7:05 am
Contact:

Re: Launching stack on server - launcher password protected

Post by FourthWorld » Fri Jun 13, 2014 11:49 pm

How does one "launch" a stack on a server?
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn

shawnblc
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 342
Joined: Fri Jun 01, 2012 11:11 pm

Re: Launching stack on server - launcher password protected

Post by shawnblc » Sat Jun 14, 2014 12:11 am

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"

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10053
Joined: Sat Apr 08, 2006 7:05 am
Contact:

Re: Launching stack on server - launcher password protected

Post by FourthWorld » Sat Jun 14, 2014 4:07 am

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.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn

shawnblc
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 342
Joined: Fri Jun 01, 2012 11:11 pm

Re: Launching stack on server - launcher password protected

Post by shawnblc » Sat Jun 14, 2014 6:11 am

Awesome Richard. Thanks for all you do.

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10053
Joined: Sat Apr 08, 2006 7:05 am
Contact:

Re: Launching stack on server - launcher password protected

Post by FourthWorld » Sat Jun 14, 2014 3:33 pm

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.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn

Simon
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3901
Joined: Sat Mar 24, 2007 2:54 am

Re: Launching stack on server - launcher password protected

Post by Simon » Sat Jun 14, 2014 7:50 pm

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
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10053
Joined: Sat Apr 08, 2006 7:05 am
Contact:

Re: Launching stack on server - launcher password protected

Post by FourthWorld » Sat Jun 14, 2014 9:12 pm

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.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn

Simon
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3901
Joined: Sat Mar 24, 2007 2:54 am

Re: Launching stack on server - launcher password protected

Post by Simon » Sat Jun 14, 2014 9:58 pm

Oh OK!
Thought there was a miracle happening.
:)

Simon
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!

Post Reply