LC Server & Server Based Stack?

Rick Harrison harrison at all-auctions.com
Fri Jan 20 22:06:00 EST 2017


Hi Mike,

Sorry I was out for dinner..

> How do you know it didn't work?


I know it didn’t work because I looked at the stack and no changes
had occurred in the stack.  (As in nothing new was put into the field.)
I’m not looking for the change to occur in the browser, that’s not
where I’m expecting to find any change thus far.

Should I not have the stack open that I’m trying to send the
messages to?  Should it be a standalone that gets saved
after every change?

> Mind if I ask what you're looking to accomplish?


I’m just trying to explore various possibilities and directions project-wise.
I don’t have a definite plan at the moment.  I’m just trying to see what
capabilities exist in using the server to communicate with stacks.

Thanks,

Rick

> On Jan 20, 2017, at 7:27 PM, Mike Bonner via use-livecode <use-livecode at lists.runrev.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
> _______________________________________________
> 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