[server] using STACKS within ON-REV

stephen barncard stephenREVOLUTION2 at barncard.com
Mon Aug 1 12:54:36 EDT 2011


On my 4.6.3 installation at Dreamhost:

*open, create* stack works for me - "*go*" probably makes no sense to the
server engine.
*new card*, *number of cards*.
I can get the contents of a field, but cannot change it. No HTMLtext of a
field. Not sure what
custom properties work - all dimensions, *set, get*
*start using* works
I've used Mark Smith's id3 library successfully on server. Lots of
subroutines and custom properties.

some objects like buttons in a stack seem to crash the calling script. It
would be useful to have  all objects be invisibly included as they could be
used as a template for a web layout. I am guessing that these are bugs that
will be straightened out.

THe use of "This stack" really gives the engine no clue as to what "this
stack" is.  I have also found this unreliable on the desktop too where there
are multiple stacks in play. I find it preferable to be explicit as possible
when referring to objects.


On 1 August 2011 08:40, Robert Mann <rman at free.fr> wrote:

> Hi all, the former thread on the subject got bugged with other
> considerations, and I'd like to share results of my tests and check it out,
> so that we can have a clear picture of what we can expect from these
> stacks.
>
> This is the very simple test I made :: made a simple "teststack.livecode"
> in
> the IDE : it contains 3 cards and 3 fields, and a few test functions.
> Dropped it in a test folder on my on-rev account, and added an index.lcfile
> at the same level.
>
> problems ::
>
> 1) go stack DOES NOT work
>
> 2) start using stack, seems to swallow all handlers from stackTest into the
> HOME stack, so that they loose all the context of their original stack.
>
> 3) fields on cards can be accessed IF THE name of the stack is precised
> each
> time.
>
> So that requires to write handlers in a different way,  a standard stack
> will break very easily on the server if an implicit ref. to a field is
> used.
>
> Any comment? Do I get it right? does "go stack work for some?
>
> Thanks all,
> Robert
>
> -----------
> details
> -----------
>
> <html>
>  <head></head>
>
>        <body>
>
>        <?lc
>
>        put "<p>CGI is on with LC</p>"
>        put "<p>----------------------</p>"
>         -- YES : the CGI works
>
>        start using stack "stackTest-v1.livecode"
>     -- go to stack "stackTest-v1.livecode"
>        -- go stack is NOT recognized as stated in the docs
>        -- http://www.runrev.com/developers/documentation/server/
>
>    put "<p>"
>    put "1 ) Simple test1 : outputing a var ="
>        put "</p>"
>    put test1()  -- simple function in stackTest that sends a chunk of text
> back.
>        -- YES :: works fine.
>
>        put "<p>"
>    put "2) name of this stack= "
>        put the name of this stack
>     put "</p>"
>
>        put "<p>"
>     put "3) Number of card of this stack="
>         put the number of cards of this stack
>      put "</p>"
>        -- ANSWER 1 CARD, beacause the context is the "HOME" card dans not
> the
> stackTest!
>
>        put "<p>"
>     put "3) BIS Number of card of this stack, but called from a function in
> the stack stcktest.   =>  "
>        put test0()
>     put "</p>"
>        -- ANSWER 1 CARD, because the context is the "HOME" card dans not
> the
> stackTest, again!
>
>     put "<p>"
>     put "4) Number of card of stack stacktest="
>        put the number of cards of stack "stacktest"
>     put "</p>"
>        -- ANSWER 3 CARD, which is right for stackTest this time.
>
>        put "<p>"
>        create card "add1"
>     put "5) Number of cards of this stack after card after addition= "
>      put the number of cards of this stack
>         put "</p>"
>        -- ANSWER 2 CARD, so we can add cards to the HOME stack.
>
>        put "<p>"
>     put "6) Field3 of card 3 of stack stacktest= "
>     put field "Field3" of card 3 of stack "stacktest"
>        put "</p>"
>        -- YES, adressing fields works, SO LONG the name of stack is
> precised.
>
>    put "6) BIS same query but from a function in the stack, with stackname"
>        put "</p>"
>    put test3()  -- simple function in stackTest that sends back the content
> of a field, precizing the stakcname
>        put "</p>"
> -- YES, adressing fields works, SO LONG the name of stack is precised.
>
>         put "<p>"
>    put "6) TER same query but from a function in the stack, without
> stackname"
>        put "</p>"
>    put test2()  -- simple function in stackTest that sends back the content
> of a field without the stackname
>        put "</p>"
>        -- NO, adressing fields works, ONLY if the name of stack is
> precised.
>        -- CSQ :: handlers and functions have to be written specifically for
> the
> server, with that limitation in mind.
>        -- go to card 1 of this stack and put field "that field" into var
> DOES NOT
> WORK! grr!
>
>        -- and that is a severe error that completely blocks the process and
> throws
> plenty of errors!!
>
>         ?>
>
>
>        </body>
>  </html>
>
>
>
> --
> View this message in context:
> http://runtime-revolution.278305.n4.nabble.com/server-using-STACKS-within-ON-REV-tp3710035p3710035.html
> Sent from the Revolution - User mailing list archive at Nabble.com.
>
> _______________________________________________
> 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
>



-- 



Stephen Barncard
San Francisco Ca. USA

more about sqb  <http://www.google.com/profiles/sbarncar>



More information about the Use-livecode mailing list