LC Server & Server Based Stack?

Mike Bonner bonnmike at gmail.com
Fri Jan 20 17:58:25 EST 2017


http://guidezone.info/stackuse.lc  -- same link to see the updated example.

On Fri, Jan 20, 2017 at 3:57 PM, Mike Bonner <bonnmike at gmail.com> wrote:

> I changed the script of the stack to match, but changed answer to put.
> The script of the lc server page is now this:
>    go stack "teststack.livecode" -- just to show that go works too
>    put "<pre>" & the script of stack "teststack" & "</pre>"
>    send "executeThis" to stack "teststack"
>
> As before, it will output the script from the stack in question, and then
> sends "executeThis" to the stack. It was probably (kinda) working before,
> you just couldn't see anything because its an answer dialog. (Though
> perhaps its possible to grab a snapshot of the dialog, close it, and post
> the pic to the page?  Not sure.)
>
>
> On Fri, Jan 20, 2017 at 3:54 PM, Mike Bonner <bonnmike at gmail.com> wrote:
>
>> The biggest problem I see is that you can't use "answer."  Answer is a
>> gui dialog box that requires action (click ok.)  If you want the text to
>> show up, use put.  (a put with no target container goes to stdout IE to the
>> web page)
>>
>> On Fri, Jan 20, 2017 at 3:35 PM, Rick Harrison via use-livecode <
>> use-livecode at lists.runrev.com> wrote:
>>
>>> Hi Mike,
>>>
>>> I was able to get your example to work fine,
>>> so it proves that I’m touching the stack Ok,
>>> but when I try to send a message to a
>>> handler script in the stack it doesn’t execute
>>> the handler.
>>>
>>> Example:
>>>
>>> send “executeThis” to stack “teststack”
>>>
>>> In the stack script of “teststack” the contents of
>>> “executeThis”:
>>>
>>> on executeThis
>>>
>>>    answer "This is the script in the teststack”
>>>
>>> end executeThis
>>>
>>> I looked at the stack..
>>> ..and the stack did nothing.
>>>
>>> What am I not doing properly here?
>>>
>>> Thanks,
>>>
>>> Rick
>>>
>>>
>>> > On Jan 20, 2017, at 2:26 PM, Mike Bonner via use-livecode <
>>> use-livecode at lists.runrev.com> wrote:
>>> >
>>> > What jacque was referring to is a different animal. An executable set
>>> up as
>>> > a cgi, that (if I recall correctly has a startup script and that after
>>> > script completion, exits)
>>> > The lc server itself runs in cgi mode (as apposed to as a module I
>>> believe)
>>> > and unless you're using the earliest version (you're not) can access
>>> and
>>> > use stacks "out of the box."
>>> >
>>> > A very simple example:
>>> >
>>> > My lcserver script..
>>> > <?lc
>>> >   start using stack "teststack.livecode"
>>> >   put "<pre>" & the script of stack "teststack" & "</pre>"
>>> >   randomize
>>> > ?>
>>> >
>>> > Starts using a very very simple stack.
>>> > Shows the script of that stack.
>>> > executes the command "randomize" that is in the stack.
>>> >
>>> > You can see it work here: http://guidezone.info/stackuse.lc
>>> >
>>> > You can of course also "go" to a stack.
>>> >
>>> >
>>>
>>> _______________________________________________
>>> 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
>>>
>>
>>
>



More information about the use-livecode mailing list