LC Server & Server Based Stack?

Mike Bonner bonnmike at gmail.com
Fri Jan 20 19:54:58 EST 2017


think I may have figured out what you're wanting to do.. Correct me if I'm
wrong.

YOu want to have an active process with an open stack that is running,
either in the ide or as a standalone. And to then be able to hit a web page
that then updates the currently open stack. If thats the case, its not
possible to do this (at least not using the method currently being looked
at.. )  There are probably ways to get this done, but updating an open
stack in a completely separate, already running  process using lc server
just isn't very feasible.  If this is the goal, let me know more about what
you want to accomplish, and maybe we can figure out a way.
If I'm entirely wrong about what you want to do, then kindly ignore the
preceding. :)

P.S. if this is the case, jacques cgi method would work better because the
cgi is a full blown engine instance with socket support, so you could hit
the web server, and then use sockets to talk to the stack you wish to
update.

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

> just checked, "this stack" should work fine (unless you do something that
> changes the context)
>
> On Fri, Jan 20, 2017 at 5:27 PM, Mike Bonner <bonnmike at gmail.com> wrote:
>
>> How do you know it didn't work?
>> Well ok.. first.. On the server you have to make sure that the stack you
>> are on is the one you think you're on.
>> If you put the name of "this stack" you can see where you are when it
>> happens.
>> Second, the server first loads the stack.  Then if you "put" something
>> into the field of the stack (especially if you are explicit so that you
>> know exactly WHAT stack and field you're putting it into,) it most likely
>> does it, but you wouldn't be able to see it in the browser, because you
>> aren't looking at the stack.  So you'd have to check the stack itself
>> (while the lc script is running, if you put something into a field, and
>> then immediately  "put the text of field blah blah blah" so that it grabs
>> the text and puts it onto the web page, you can see that it is indeed
>> there.  Since each hit to the web server is a new instance, the next time
>> you hit the page, the text would not be in that field, UNLESS you told the
>> lc script to save the stack.
>>
>> This is how I created the test stack I'm using.  I had the lc script
>> create the stack, set the script of the stack, set the filename of the
>> stack, then saved the stack.  IF I had also created and populated fields in
>> the stack and then saved it, the fields would still be populated and the
>> text could then be extracted from them.  (It would get much more complex
>> with multiple users of course, due to concurrency poblems)
>>
>> Mind if I ask what you're looking to accomplish?
>>
>> On Fri, Jan 20, 2017 at 5:00 PM, Rick Harrison via use-livecode <
>> use-livecode at lists.runrev.com> wrote:
>>
>>> Hi Mike,
>>>
>>> Ok, the put message in the stack showed up in my browser
>>> so that worked fine.  My next line of code I tried was:
>>>
>>> put "I hope this worked!" into field "TestFirstNameField1" of card 1 of
>>> this stack
>>>
>>> It didn’t put anything into that field.  I also put the same code into a
>>> button
>>> on the stack to test it, and the button works fine with the same code.
>>> Why doesn’t this work?
>>>
>>> Thanks,
>>>
>>> Rick
>>> _______________________________________________
>>> 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