[Server] create stack trouble

Richard Gaskin ambassador at fourthworld.com
Tue Aug 9 08:30:00 EDT 2011

stephen barncard wrote:
>  Again, Robert I have to disagree with you about this. You seem to feel
> shortchanged somehow with the way stacks work on the server, yet it's really
> doing all it can do in that environment.
> What else would you want a stack to do on a server? The GUI has to be
> created in HTML - it's a web browser you're looking at from the user's point
> of view. If you want Livecode to work like an app online with its GUI, it's
> been done --- the Livecode Revlet.
>  I must repeat that card creation is NOT broken,  I have been able to create
> and access custom properties of cards as well as stacks, which gives yet
> another dimension to the storage matrix.
> Field creation or the creation of any other object than stacks, cards and
> props is pointless and not applicable...

Sometimes.  But there may be times when stack files, and the objects 
within them, can provide convenient data storage.  Custom properties are 
a natural fit for server work, but since fields make a convenient way to 
translate some aspects of text-to-HTML and HTML-to-text they can be 
useful too.

I don't use RevServer at the moment, but the following works in the v3.5 
CGI engine, so conceivably it could be made to work with RevServer:

#!../../bin/rev -ui

on startup
   create stack "datastack"
   set the filename of stack "datastack" to "testdata/data.rev"
   set the defaultstack to "datastack"
   create cd
   create field
   save stack "datastack"
   -- Provide some output so we know it completed successfully:
   put "Content-Type: text/html" & crlf &\
            "Content-Length:"&& length("Hello") & crlf & crlf
   put "Done"
end startup

When I download the created stack, it has both the new card and the 
card's new field.

  Richard Gaskin
  Fourth World
  LiveCode training and consulting: http://www.fourthworld.com
  Webzine for LiveCode developers: http://www.LiveCodeJournal.com
  LiveCode Journal blog: http://LiveCodejournal.com/blog.irv

More information about the Use-livecode mailing list