Using Stacks With LiveCode Server

Phil Davis revdev at pdslabs.net
Tue Aug 28 17:21:53 EDT 2012


Hi Gregory,

Try using the full path to the stackfile in your "start using" 
statement. That should work. Like so:

     start using "/Users/me/Documents/mystackfile.livecode"

Best -
Phil Davis




On 8/28/12 1:54 PM, Gregory Lypny wrote:
> Hello everyone,
>
> I've got LiveCode server up and running on my Mac (OS X Mountain Lion).  I'd like to be able to store a bunch of handlers in the stack script of a library stack, but I am not sure where to place the stack and how to refer to it from within web pages.
>
> Suppose I have a simple test page named LiveCodeServerTest.lc that is in my Sites folder.  The HTML code in it is below.  Notice that in the code, I have a line that refers to a stack called ServerLibrary.livecode.  The next line calls a handler named serverTest, which resides in the stack script of the stack.  When I load the page, I get the following error:
>
> file "/Users/gregory/Sites/livecodeservertest.lc"
>    row 15, col 1: start: can't find object
>
> I have tried different paths with no luck.  What am I doing wrong?
>
> Regards,
>
> Gregory
>
>
>
> The test page:
>
> <html>
>
> <head>
>       <title>My LiveCode Server Test Page</title>
> </head>
>
> <body>
>       <h1>My LiveCode Server Test Page</h1>
>
> <?lc
>       put "<p>Hello World! from LiveCode Server</p>"
>       put "<p>The date is" && the long date && the long time & "</p>"
>
> start using "ServerLibrary.livecode"
>
> serverTest
>
> ?>
> </body>
>
> </html>
>
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>

-- 
Phil Davis





More information about the use-livecode mailing list