Re: LC Server & Server Based Stack?

2017-01-23 Thread Rick Harrison via use-livecode
Hi Bob,

The LC Dictionary shows AppleScript commands are for the desktop only - so 
probably lcServer can’t do it.
If there is anyone on the list who has had success having lcServer send 
AppleScript commands please feel 
free to chime in!

Thanks,

Rick

> On Jan 23, 2017, at 10:38 AM, Bob Sneidar via use-livecode 
>  wrote:
> 
> If you have a Mac, there is IAC Inter-Application Communication). I am not 
> sure if lcServer can issue Applescript commands, but you CAN create a 
> standalone to listen for Applescript commands, and the IDE runnign on a Mac 
> does this natively. 
> 
> Bob S

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Re: LC Server & Server Based Stack?

2017-01-23 Thread Bob Sneidar via use-livecode
If you have a Mac, there is IAC Inter-Application Communication). I am not sure 
if lcServer can issue Applescript commands, but you CAN create a standalone to 
listen for Applescript commands, and the IDE runnign on a Mac does this 
natively. 

Bob S


> On Jan 22, 2017, at 11:12 , Rick Harrison via use-livecode 
>  wrote:
> 
> Hi Mike,
> 
> Ok, so the server and my open LC stack are using
> different engines or are different “instances”.  If they
> are on the same computer it seems to me that one
> might be able to get the two to talk to each other
> through the computer system’s clipboard in theory.
> 
> I haven’t had much luck with getting the contents
> of a variable into the clipboard on the server side
> yet.  It keeps throwing weird errors at me.
> Can you think of an easy way to do that?
> 
> Thanks,
> 
> Rick
> 
>> On Jan 21, 2017, at 12:10 PM, Mike Bonner via use-livecode 
>>  wrote:
>> 
>> Yeah, thats what I'm saying.  Think of it this way.  If you make 2
>> standalones, run both, and have 1 standalone try to put text into a field
>> of the other, it won't work because they are each running their own engine
>> instance.  If one engine instance opens several stacks they're able to talk
>> because its all through one instance of the engine, and they're all
>> interconnected through the engine.
>> 
>> Lc server is an instance, and the standalone, or ide that has your open
>> stack is an instance.  So there is no direct connection between the 2.  It
>> would be like opening the same text file twice in 2 separate text editors.
>> If you type in 1, the change doesn't appear in the other.  You'd have to
>> type in 1, save the changes then reload the text in the other to see the
>> changes that were made.
>> 
>> If using a file to update will work, it should be simple enough.. (and not
>> require stacks on the server side.)  Have the server write the necessary
>> info, and have an update button on your stack that will grab the new info,
>> or have the stack keep checking for changes every so often, and update as
>> necessary.
>> 
>> As far as sockets, chatrev is a pretty awesome example.  If you click
>> "resources" in the main toolbar, then select "sample projects" on the lower
>> left, there is an "internet chat" that you can poke around with to get a
>> handle on things.
>> 
>> If you decide to go the socket way and the cgi (non lc server) method, i'll
>> be little help.  I'm not even sure which versions of the lc engine will
>> work for this, but you said you already looked at jacques page, so are on
>> the right track.
>> 
>> I have mentioned it before, but there is the revhttpd stack.. If you don't
>> need multithreading, it would make a great starting base.  (and another way
>> to explore sockets too)  I love the thing, especially the ability to add
>> commands to the stack that are then callable using a get request of the
>> form cmd=commandtorun
> 
> 
> ___
> use-livecode mailing list
> use-livecode@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@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Re: LC Server & Server Based Stack?

2017-01-23 Thread Bob Sneidar via use-livecode
That is becase the parent process for both stacks is the IDE. In a web browser, 
as previously mentioned, each time lcServer runs a script it is a new process.

Bob S


On Jan 21, 2017, at 07:47 , Rick Harrison via use-livecode 
> wrote:

Hi Mike,

This seems a little crazy to me.

I can have two stacks open in memory in LiveCode, and I
can send a message such as “mouseUp” from one stack
to a button in the other stack. The button in the other stack
outputs some messages to the message box and puts a
message in a field on that stack and that all works just fine.
I’m able to view both stacks on the screen at the same time.
(This is as it should be.)

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Re: LC Server & Server Based Stack?

2017-01-22 Thread Rick Harrison via use-livecode
I really wish the copy to clipboard thing would have worked because it
would have been a very simple solution for a personal application I
wanted to work on for myself.

I will endeavor to learn about sockets etc. even though that is
more of a learning curve here. I would rather have found
something simple, but unfortunately the things one thinks
should be simple usually turn out to be harder than imagined.

Thank you Richard and Mike for pointing out the resources
that I need to conquer!

Rick

> On Jan 22, 2017, at 4:05 PM, Richard Gaskin via use-livecode 
>  wrote:
> 
> Rick Harrison wrote:
> 
>> Ok, so the server and my open LC stack are using
>> different engines or are different “instances”.  If they
>> are on the same computer it seems to me that one
>> might be able to get the two to talk to each other
>> through the computer system’s clipboard in theory.
>> 
>> I haven’t had much luck with getting the contents
>> of a variable into the clipboard on the server side
>> yet.  It keeps throwing weird errors at me.
>> Can you think of an easy way to do that?
> 
> The clipboard is a good mechanism for an end-user to exchange data
> between GUI programs.
> 
> For programs to exchange data between themselves without a GUI, you'll
> want to use sockets.
> 
> This tutorial is the best entry-point for learning sockets I've found yet:
> 
> 
> 
> -- 
> Richard Gaskin
> Fourth World Systems
> Software Design and Development for the Desktop, Mobile, and the Web
> 
> ambassa...@fourthworld.comhttp://www.FourthWorld.com
> 
> ___
> use-livecode mailing list
> use-livecode@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@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Re: LC Server & Server Based Stack?

2017-01-22 Thread Mike Bonner via use-livecode
What richard said.  Instead of the clipboard (which I suspect doesn't work
because the lc server engine is not running in the same shell instance)
 The idea of using a file as an intermediary storage container would work,
but sockets would be so much better.   (Since this will be same machine
sockets, you might read up on named sockets too... IE sockets tagged by a
unique identifier like the seconds or something of that nature.  Otherwise
(I think) if the server is hit twice quickly, the second socket opening
will fail because its blocked by the first.  Named sockets gets around this
porblem)

On Sun, Jan 22, 2017 at 2:05 PM, Richard Gaskin via use-livecode <
use-livecode@lists.runrev.com> wrote:

> Rick Harrison wrote:
>
> > Ok, so the server and my open LC stack are using
> > different engines or are different “instances”.  If they
> > are on the same computer it seems to me that one
> > might be able to get the two to talk to each other
> > through the computer system’s clipboard in theory.
> >
> > I haven’t had much luck with getting the contents
> > of a variable into the clipboard on the server side
> > yet.  It keeps throwing weird errors at me.
> > Can you think of an easy way to do that?
>
> The clipboard is a good mechanism for an end-user to exchange data
> between GUI programs.
>
> For programs to exchange data between themselves without a GUI, you'll
> want to use sockets.
>
> This tutorial is the best entry-point for learning sockets I've found yet:
>
>  applications-using-sockets>
>
> --
>  Richard Gaskin
>  Fourth World Systems
>  Software Design and Development for the Desktop, Mobile, and the Web
>  
>  ambassa...@fourthworld.comhttp://www.FourthWorld.com
>
> ___
> use-livecode mailing list
> use-livecode@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@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Re: LC Server & Server Based Stack?

2017-01-22 Thread Richard Gaskin via use-livecode
Rick Harrison wrote:

> Ok, so the server and my open LC stack are using
> different engines or are different “instances”.  If they
> are on the same computer it seems to me that one
> might be able to get the two to talk to each other
> through the computer system’s clipboard in theory.
>
> I haven’t had much luck with getting the contents
> of a variable into the clipboard on the server side
> yet.  It keeps throwing weird errors at me.
> Can you think of an easy way to do that?

The clipboard is a good mechanism for an end-user to exchange data
between GUI programs.

For programs to exchange data between themselves without a GUI, you'll
want to use sockets.

This tutorial is the best entry-point for learning sockets I've found yet:



-- 
 Richard Gaskin
 Fourth World Systems
 Software Design and Development for the Desktop, Mobile, and the Web
 
 ambassa...@fourthworld.comhttp://www.FourthWorld.com

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Re: LC Server & Server Based Stack?

2017-01-22 Thread Rick Harrison via use-livecode
Hi Mike,

Ok, so the server and my open LC stack are using
different engines or are different “instances”.  If they
are on the same computer it seems to me that one
might be able to get the two to talk to each other
through the computer system’s clipboard in theory.

I haven’t had much luck with getting the contents
of a variable into the clipboard on the server side
yet.  It keeps throwing weird errors at me.
Can you think of an easy way to do that?

Thanks,

Rick

> On Jan 21, 2017, at 12:10 PM, Mike Bonner via use-livecode 
>  wrote:
> 
> Yeah, thats what I'm saying.  Think of it this way.  If you make 2
> standalones, run both, and have 1 standalone try to put text into a field
> of the other, it won't work because they are each running their own engine
> instance.  If one engine instance opens several stacks they're able to talk
> because its all through one instance of the engine, and they're all
> interconnected through the engine.
> 
> Lc server is an instance, and the standalone, or ide that has your open
> stack is an instance.  So there is no direct connection between the 2.  It
> would be like opening the same text file twice in 2 separate text editors.
> If you type in 1, the change doesn't appear in the other.  You'd have to
> type in 1, save the changes then reload the text in the other to see the
> changes that were made.
> 
> If using a file to update will work, it should be simple enough.. (and not
> require stacks on the server side.)  Have the server write the necessary
> info, and have an update button on your stack that will grab the new info,
> or have the stack keep checking for changes every so often, and update as
> necessary.
> 
> As far as sockets, chatrev is a pretty awesome example.  If you click
> "resources" in the main toolbar, then select "sample projects" on the lower
> left, there is an "internet chat" that you can poke around with to get a
> handle on things.
> 
> If you decide to go the socket way and the cgi (non lc server) method, i'll
> be little help.  I'm not even sure which versions of the lc engine will
> work for this, but you said you already looked at jacques page, so are on
> the right track.
> 
> I have mentioned it before, but there is the revhttpd stack.. If you don't
> need multithreading, it would make a great starting base.  (and another way
> to explore sockets too)  I love the thing, especially the ability to add
> commands to the stack that are then callable using a get request of the
> form cmd=commandtorun


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Re: LC Server & Server Based Stack?

2017-01-21 Thread Mike Bonner via use-livecode
Yeah, thats what I'm saying.  Think of it this way.  If you make 2
standalones, run both, and have 1 standalone try to put text into a field
of the other, it won't work because they are each running their own engine
instance.  If one engine instance opens several stacks they're able to talk
because its all through one instance of the engine, and they're all
interconnected through the engine.

Lc server is an instance, and the standalone, or ide that has your open
stack is an instance.  So there is no direct connection between the 2.  It
would be like opening the same text file twice in 2 separate text editors.
If you type in 1, the change doesn't appear in the other.  You'd have to
type in 1, save the changes then reload the text in the other to see the
changes that were made.

If using a file to update will work, it should be simple enough.. (and not
require stacks on the server side.)  Have the server write the necessary
info, and have an update button on your stack that will grab the new info,
or have the stack keep checking for changes every so often, and update as
necessary.

As far as sockets, chatrev is a pretty awesome example.  If you click
"resources" in the main toolbar, then select "sample projects" on the lower
left, there is an "internet chat" that you can poke around with to get a
handle on things.

If you decide to go the socket way and the cgi (non lc server) method, i'll
be little help.  I'm not even sure which versions of the lc engine will
work for this, but you said you already looked at jacques page, so are on
the right track.

I have mentioned it before, but there is the revhttpd stack.. If you don't
need multithreading, it would make a great starting base.  (and another way
to explore sockets too)  I love the thing, especially the ability to add
commands to the stack that are then callable using a get request of the
form cmd=commandtorun

On Sat, Jan 21, 2017 at 8:47 AM, Rick Harrison via use-livecode <
use-livecode@lists.runrev.com> wrote:

> Hi Mike,
>
> This seems a little crazy to me.
>
> I can have two stacks open in memory in LiveCode, and I
> can send a message such as “mouseUp” from one stack
> to a button in the other stack. The button in the other stack
> outputs some messages to the message box and puts a
> message in a field on that stack and that all works just fine.
> I’m able to view both stacks on the screen at the same time.
> (This is as it should be.)
>
> I send the same message from the server to the button
> and the messages which normally go into the message box
> end up in the display of my browser which seems a little strange but Ok
> I can accept that.  The other message which was supposed to
> go into the field never gets to the field which makes it look
> like the button ignored that statement completely although
> it executed everything else it was asked to perform.  That
> message doesn’t seem to go anywhere as it doesn’t even
> end up being displayed in the browser and ends up in the
> bit bucket in the sky.  (Again, I can see the open stack
> on the screen at the time that I tell my browser to execute
> the server code.) Shouldn’t a message be a valid message
> no matter where it comes from? (Hence my crazy feeling
> about the whole thing.)
>
> So you are telling me that I can send a message to closed
> stack to modify it, that I should save it after the change, and
> then reopen the stack to view the change - yes?
>
> The file communication idea makes things a little more
> complex but is certainly doable.
>
> I’ve never done anything with sockets - are there any good
> examples out there you can point me to for this?
>
> Thanks,
>
> Rick
>
>
>
> > On Jan 20, 2017, at 10:20 PM, Mike Bonner via use-livecode <
> use-livecode@lists.runrev.com> wrote:
> >
> > You can modify a stack using lc server, and save it, but that won't
> update
> > an already open stack in memory.  And if you don't add code to save the
> > stack from lc server, even if you do reload the stack, the change won't
> be
> > there.
> >
> > One way to update a field in an open stack would be to have the stack
> > running a send in time loop that checks for changes to a file. (text
> file,
> > or whatever)  If the last modified stamp has changed (or if the file
> > exists, or however you want to do it)  read and parse the file, to get
> the
> > info and put it wherever it goes then clear or delete the file.  You'd
> > still have to think about concurrency issues, but it should work.
> > the jacque standalone cgi method (as I mentioned in a different email)
> > would be cool because you could hit the webserver, open a socket to your
> > open stack to pass data from the server to the running stack.
>
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode

Re: LC Server & Server Based Stack?

2017-01-21 Thread Rick Harrison via use-livecode
Hi Mike,

This seems a little crazy to me.  

I can have two stacks open in memory in LiveCode, and I 
can send a message such as “mouseUp” from one stack 
to a button in the other stack. The button in the other stack 
outputs some messages to the message box and puts a 
message in a field on that stack and that all works just fine.
I’m able to view both stacks on the screen at the same time.
(This is as it should be.) 

I send the same message from the server to the button
and the messages which normally go into the message box 
end up in the display of my browser which seems a little strange but Ok
I can accept that.  The other message which was supposed to
go into the field never gets to the field which makes it look
like the button ignored that statement completely although
it executed everything else it was asked to perform.  That
message doesn’t seem to go anywhere as it doesn’t even
end up being displayed in the browser and ends up in the
bit bucket in the sky.  (Again, I can see the open stack
on the screen at the time that I tell my browser to execute
the server code.) Shouldn’t a message be a valid message
no matter where it comes from? (Hence my crazy feeling
about the whole thing.)

So you are telling me that I can send a message to closed
stack to modify it, that I should save it after the change, and
then reopen the stack to view the change - yes?

The file communication idea makes things a little more
complex but is certainly doable.

I’ve never done anything with sockets - are there any good
examples out there you can point me to for this?

Thanks,

Rick



> On Jan 20, 2017, at 10:20 PM, Mike Bonner via use-livecode 
>  wrote:
> 
> You can modify a stack using lc server, and save it, but that won't update
> an already open stack in memory.  And if you don't add code to save the
> stack from lc server, even if you do reload the stack, the change won't be
> there.
> 
> One way to update a field in an open stack would be to have the stack
> running a send in time loop that checks for changes to a file. (text file,
> or whatever)  If the last modified stamp has changed (or if the file
> exists, or however you want to do it)  read and parse the file, to get the
> info and put it wherever it goes then clear or delete the file.  You'd
> still have to think about concurrency issues, but it should work.
> the jacque standalone cgi method (as I mentioned in a different email)
> would be cool because you could hit the webserver, open a socket to your
> open stack to pass data from the server to the running stack.

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Re: LC Server & Server Based Stack?

2017-01-20 Thread Mike Bonner via use-livecode
You can modify a stack using lc server, and save it, but that won't update
an already open stack in memory.  And if you don't add code to save the
stack from lc server, even if you do reload the stack, the change won't be
there.

One way to update a field in an open stack would be to have the stack
running a send in time loop that checks for changes to a file. (text file,
or whatever)  If the last modified stamp has changed (or if the file
exists, or however you want to do it)  read and parse the file, to get the
info and put it wherever it goes then clear or delete the file.  You'd
still have to think about concurrency issues, but it should work.
the jacque standalone cgi method (as I mentioned in a different email)
would be cool because you could hit the webserver, open a socket to your
open stack to pass data from the server to the running stack.

On Fri, Jan 20, 2017 at 8:06 PM, Rick Harrison via use-livecode <
use-livecode@lists.runrev.com> wrote:

> 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@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@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@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@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@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@lists.runrev.com
Please visit this url to subscribe, unsubscribe and 

Re: LC Server & Server Based Stack?

2017-01-20 Thread Rick Harrison via use-livecode
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 
>  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@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@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@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@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Re: LC Server & Server Based Stack?

2017-01-20 Thread J. Landman Gay via use-livecode

On 1/20/17 6:00 PM, Rick Harrison via use-livecode wrote:

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.


When you are working on a server, you can only see what gets put into 
the browser. There is no stack to examine visually. Anywhere a script 
uses "put" without a destination, the text will go to the browser window 
where you can see it. Anything that is put into the stack itself won't 
be visible.


Each time the server runs a script, it starts from scratch. Nothing is 
saved from previous runs (unless you script it.) So you can't run the 
script on the server and then look at the stack later -- it won't have 
been saved.


Another option if you do want to see a real stack inside a browser is 
the (as yet immature) HTML5 feature. That does put a stack into a 
browser window, with buttons, fields, and all the basic object behaviors 
you are used to. It is still young yet though and has some limitations.


--
Jacqueline Landman Gay | jac...@hyperactivesw.com
HyperActive Software   | http://www.hyperactivesw.com


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Re: LC Server & Server Based Stack?

2017-01-20 Thread Mike Bonner via use-livecode
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  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  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@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@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@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Re: LC Server & Server Based Stack?

2017-01-20 Thread Mike Bonner via use-livecode
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  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@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@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@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Re: LC Server & Server Based Stack?

2017-01-20 Thread Mike Bonner via use-livecode
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@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@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@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Re: LC Server & Server Based Stack?

2017-01-20 Thread Rick Harrison via use-livecode
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@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Re: LC Server & Server Based Stack?

2017-01-20 Thread Mike Bonner via use-livecode
The quotes were funky in this like..answer "This is the script in the
teststack"  (I think thats where I fixed it)


On Fri, Jan 20, 2017 at 4:07 PM, Mike Bonner  wrote:

> I noticed something in the code you posted before.  Messed up quotes in
> the stack script code.  I fixed those at the same time but had assumed they
> were just a typo.  Maybe not?
>
> On Fri, Jan 20, 2017 at 4:05 PM, Rick Harrison via use-livecode <
> use-livecode@lists.runrev.com> wrote:
>
>> Hi Mike,
>>
>> Sorry, I didn’t see this until I had already sent my last message.  LOL
>>
>> Yes, I see that things work on your end.  I’ll try it again.
>>
>> Thanks,
>>
>> Rick
>>
>> > On Jan 20, 2017, at 5:58 PM, Mike Bonner via use-livecode <
>> use-livecode@lists.runrev.com> wrote:
>> >
>> > http://guidezone.info/stackuse.lc  -- same link to see the updated
>> example.
>> >
>>
>>
>> ___
>> use-livecode mailing list
>> use-livecode@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@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Re: LC Server & Server Based Stack?

2017-01-20 Thread Mike Bonner via use-livecode
I noticed something in the code you posted before.  Messed up quotes in the
stack script code.  I fixed those at the same time but had assumed they
were just a typo.  Maybe not?

On Fri, Jan 20, 2017 at 4:05 PM, Rick Harrison via use-livecode <
use-livecode@lists.runrev.com> wrote:

> Hi Mike,
>
> Sorry, I didn’t see this until I had already sent my last message.  LOL
>
> Yes, I see that things work on your end.  I’ll try it again.
>
> Thanks,
>
> Rick
>
> > On Jan 20, 2017, at 5:58 PM, Mike Bonner via use-livecode <
> use-livecode@lists.runrev.com> wrote:
> >
> > http://guidezone.info/stackuse.lc  -- same link to see the updated
> example.
> >
>
>
> ___
> use-livecode mailing list
> use-livecode@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@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Re: LC Server & Server Based Stack?

2017-01-20 Thread Rick Harrison via use-livecode
Hi Mike,

Sorry, I didn’t see this until I had already sent my last message.  LOL

Yes, I see that things work on your end.  I’ll try it again.

Thanks,

Rick

> On Jan 20, 2017, at 5:58 PM, Mike Bonner via use-livecode 
>  wrote:
> 
> http://guidezone.info/stackuse.lc  -- same link to see the updated example.
> 


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Re: LC Server & Server Based Stack?

2017-01-20 Thread Rick Harrison via use-livecode
Hi Mike,

I had tried “put” before I tried “answer”
and it hadn’t worked which was why I
tried “answer”.

Did you test your new code before posting
this to me?

Thanks,

Rick

> On Jan 20, 2017, at 5:57 PM, Mike Bonner via use-livecode 
>  wrote:
> 
>   go stack "teststack.livecode" -- just to show that go works too
>   put "" & the script of stack "teststack" & ""
>   send "executeThis" to stack "teststack"

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Re: LC Server & Server Based Stack?

2017-01-20 Thread Mike Bonner via use-livecode
http://guidezone.info/stackuse.lc  -- same link to see the updated example.

On Fri, Jan 20, 2017 at 3:57 PM, Mike Bonner  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 "" & the script of stack "teststack" & ""
>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  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@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@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..
>>> > >> >   start using stack "teststack.livecode"
>>> >   put "" & the script of stack "teststack" & ""
>>> >   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@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@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Re: LC Server & Server Based Stack?

2017-01-20 Thread Mike Bonner via use-livecode
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 "" & the script of stack "teststack" & ""
   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  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@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@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..
>> > > >   start using stack "teststack.livecode"
>> >   put "" & the script of stack "teststack" & ""
>> >   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@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@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Re: LC Server & Server Based Stack?

2017-01-20 Thread Mike Bonner via use-livecode
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@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@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..
> >  >   start using stack "teststack.livecode"
> >   put "" & the script of stack "teststack" & ""
> >   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@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@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Re: LC Server & Server Based Stack?

2017-01-20 Thread Rick Harrison via use-livecode
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 
>  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..
>start using stack "teststack.livecode"
>   put "" & the script of stack "teststack" & ""
>   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@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Re: LC Server & Server Based Stack?

2017-01-20 Thread Mike Bonner via use-livecode
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..
" & the script of stack "teststack" & ""
   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.

On Fri, Jan 20, 2017 at 11:30 AM, Rick Harrison via use-livecode <
use-livecode@lists.runrev.com> wrote:

> Hi Jacque & Stephen,
>
> Right now I’m running LC Server version 8.1.2 as it
> is supposed to be set up from the mothership’s
> perspective.
>
> I’ve been looking at Jacque’s site.  The information there
> seems a little old and dated.  Is the information there still
> current enough to work?
>
> It also looks like the server as it comes from the company
> is not set up as CGI out of the box, so I’m assuming that
> I have to set it up according to Jacque’s website so that
> whatever stack I designate with the "start using Stack (pathname)”
> will work.
>
> I’m surprised that the official LiveCode website doesn’t have a lot
> more documentation and examples with a few example
> images.  It looks like Jacque’s website is better although it
> too lacks images.
>
> From what I’m reading, what I’m looking to do sounds possible,
> yet the example resources seem to need some updating before
> it will all work as promised.  Suggestions?
>
> Thank you for your help on this.
>
> Rick
>
> > On Jan 8, 2017, at 5:07 PM, J. Landman Gay via use-livecode <
> use-livecode@lists.runrev.com> wrote:
> >
> > My site is focused on old-style CGI. It's an alternative to LC server
> scripts, which act more like PHP,. Both are viable methods but slightly
> different.
> >
> > --
> > Jacqueline Landman Gay | jac...@hyperactivesw.com
> > HyperActive Software   | http://www.hyperactivesw.com
> >
> >
> >
> > On January 8, 2017 2:49:16 PM Stephen Barncard via use-livecode <
> use-livecode@lists.runrev.com> wrote:
> >
> >> Jacque's site is a great resource for livecode server information.
> >>
> >> http://www.hyperactivesw.com/cgitutorial/scripts4.html
> >>
> >> there doesn't appear to be many of us, but we who use LC server will
> >> probably never have to use PHP very much any more for our web
> programming.
> >>
> >> And the open source version is the only version!
> >>
> >> I improperly credited John Craig for RevIgniter, which of course was
> >> written by Ralf Bitter. Sorry about that.
> >>
> >> --
> >> Stephen Barncard - Sebastopol Ca. USA -
> >> mixstream.org
> >>
> >> On Sun, Jan 8, 2017 at 12:42 PM, Stephen Barncard  >
> >> wrote:
> >>
> >>> some stack use info as used in web app RevIgniter:
> >>>
> >>> https://revigniter.com/userGuide/general/using_stacks.html
> >>>
> >>> by the way, RevIgniter is a self-contained framework that you might
> find
> >>> useful for all kinds of web development in livecode.
> >>>
> >>> It might be a little different than your own programming style, but
> John
> >>> Craig's creation is a living example of the "Model-View-Controller"
> >>> concept.
> >>>
> >>> --
> >>> Stephen Barncard - Sebastopol Ca. USA -
> >>> mixstream.org
> >>>
> >>> On Sun, Jan 8, 2017 at 12:34 PM, Stephen Barncard <
> step...@barncard.com>
> >>> wrote:
> >>>
>  here's some basics from the docs
> 
>  http://lessons.livecode.com/m/4070/l/36656-how-do-i-use-stac
>  ks-with-livecode-server
> 
>  --
>  Stephen Barncard - Sebastopol Ca. USA -
>  mixstream.org
> 
>  On Sun, Jan 8, 2017 at 12:17 PM, Rick Harrison via use-livecode <
>  use-livecode@lists.runrev.com> wrote:
> 
> > Hi Stephen,
> >
> > That sounds promising.. do you know of any good examples?
> >
> > Thanks,
> >
> > Rick
> >
> > > On Jan 8, 2017, at 3:12 PM, Stephen Barncard via use-livecode <
> > use-livecode@lists.runrev.com> wrote:
> > >
> > > stacks are great with LC server. For instance, one can use custom
> > > properties and libraries just by 'start using' that stack.
> > >
> > > I'm not sure about fields but I think they are accessible too.
> > >
> > > And one can test and edit everything 'on the ground' first.
> >
> > ___
> > use-livecode mailing list
> > use-livecode@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
> >> 

Re: LC Server & Server Based Stack?

2017-01-20 Thread Rick Harrison via use-livecode
Hi Jacque & Stephen,

Right now I’m running LC Server version 8.1.2 as it
is supposed to be set up from the mothership’s
perspective.

I’ve been looking at Jacque’s site.  The information there
seems a little old and dated.  Is the information there still
current enough to work?  

It also looks like the server as it comes from the company
is not set up as CGI out of the box, so I’m assuming that
I have to set it up according to Jacque’s website so that
whatever stack I designate with the "start using Stack (pathname)”
will work.

I’m surprised that the official LiveCode website doesn’t have a lot
more documentation and examples with a few example
images.  It looks like Jacque’s website is better although it
too lacks images.

From what I’m reading, what I’m looking to do sounds possible,
yet the example resources seem to need some updating before
it will all work as promised.  Suggestions?

Thank you for your help on this.

Rick

> On Jan 8, 2017, at 5:07 PM, J. Landman Gay via use-livecode 
>  wrote:
> 
> My site is focused on old-style CGI. It's an alternative to LC server 
> scripts, which act more like PHP,. Both are viable methods but slightly 
> different.
> 
> --
> Jacqueline Landman Gay | jac...@hyperactivesw.com
> HyperActive Software   | http://www.hyperactivesw.com
> 
> 
> 
> On January 8, 2017 2:49:16 PM Stephen Barncard via use-livecode 
>  wrote:
> 
>> Jacque's site is a great resource for livecode server information.
>> 
>> http://www.hyperactivesw.com/cgitutorial/scripts4.html
>> 
>> there doesn't appear to be many of us, but we who use LC server will
>> probably never have to use PHP very much any more for our web programming.
>> 
>> And the open source version is the only version!
>> 
>> I improperly credited John Craig for RevIgniter, which of course was
>> written by Ralf Bitter. Sorry about that.
>> 
>> --
>> Stephen Barncard - Sebastopol Ca. USA -
>> mixstream.org
>> 
>> On Sun, Jan 8, 2017 at 12:42 PM, Stephen Barncard 
>> wrote:
>> 
>>> some stack use info as used in web app RevIgniter:
>>> 
>>> https://revigniter.com/userGuide/general/using_stacks.html
>>> 
>>> by the way, RevIgniter is a self-contained framework that you might find
>>> useful for all kinds of web development in livecode.
>>> 
>>> It might be a little different than your own programming style, but John
>>> Craig's creation is a living example of the "Model-View-Controller"
>>> concept.
>>> 
>>> --
>>> Stephen Barncard - Sebastopol Ca. USA -
>>> mixstream.org
>>> 
>>> On Sun, Jan 8, 2017 at 12:34 PM, Stephen Barncard 
>>> wrote:
>>> 
 here's some basics from the docs
 
 http://lessons.livecode.com/m/4070/l/36656-how-do-i-use-stac
 ks-with-livecode-server
 
 --
 Stephen Barncard - Sebastopol Ca. USA -
 mixstream.org
 
 On Sun, Jan 8, 2017 at 12:17 PM, Rick Harrison via use-livecode <
 use-livecode@lists.runrev.com> wrote:
 
> Hi Stephen,
> 
> That sounds promising.. do you know of any good examples?
> 
> Thanks,
> 
> Rick
> 
> > On Jan 8, 2017, at 3:12 PM, Stephen Barncard via use-livecode <
> use-livecode@lists.runrev.com> wrote:
> >
> > stacks are great with LC server. For instance, one can use custom
> > properties and libraries just by 'start using' that stack.
> >
> > I'm not sure about fields but I think they are accessible too.
> >
> > And one can test and edit everything 'on the ground' first.
> 
> ___
> use-livecode mailing list
> use-livecode@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@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@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@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Re: LC Server & Server Based Stack?

2017-01-08 Thread Mike Bonner via use-livecode
It was mostly in response to having lc (in cgi mode) talk to a different
(non-http connected) process.

On Sun, Jan 8, 2017 at 10:32 PM, Phil Davis via use-livecode <
use-livecode@lists.runrev.com> wrote:

> Hi Mike,
>
> It sounds like you're talking about things that apply when your server
> stack is used in a long-running LC process. If you run in CGI mode, you
> don't have to deal with some of those things (like figuring out when to
> reload a stack). Personally I'm glad the on-rev default is CGI mode.
>
> Best -
> Phil Davis
>
>
>
>
> On 1/8/17 7:26 PM, Mike Bonner via use-livecode wrote:
>
>> Sorry I didn't get back to you till now, but it looks like things are
>> covered as far as accessing a stack file from lc server.  As for the other
>> direction, (lc server talking to an in memory stack..)  FROM the stack
>> itself would be a simple http request, but the reverse not so much.
>>
>> I'm now curious though.  If one were to change an lc stack file, and have
>> your executing stack look for an updated timestamp ever so often, you
>> could
>> have it unload the old version, and reload the freshly updated one for
>> processing possibly.  Though it would probably be simpler to have lc
>> server
>> write to a file and just load whatever new data from the file with the
>> stack.
>>
>> Or, if the stack doesn't need to be running all the time, lc server could
>> shell call the stack executable (perhaps a simple stackrunner) that would
>> take an external stackfile name as a parameter to do whatever it is you
>> need to do.
>>
>> Also, depending on what you need to do, the httpd stack by andre garzia is
>> pretty awesome.  (it would bipass the need for lc server, but is single
>> threaded so might not be appropriate for some things)Its been a while
>> since I messed with it, but when I did, I set up an android app that took
>> in swipes and clicks and sent the information to the httpd  stack (and at
>> the time I had managed to build a "click" external.. its probably here
>> somewhere).. basically i had a home brew computer remote control app that
>> was incredibly simple to build, and worked great.  If it fits your use
>> case, that httpd stack is awesome.
>>
>> On Sun, Jan 8, 2017 at 6:39 PM, Rick Harrison via use-livecode <
>> use-livecode@lists.runrev.com> wrote:
>>
>> Hi Stephen, Phil, & Jacque,
>>>
>>> Thanks for the info!  I’ll get back to you after studying this stuff.
>>>
>>> Rick
>>>
>>> On Jan 8, 2017, at 3:42 PM, Stephen Barncard via use-livecode <

>>> use-livecode@lists.runrev.com> wrote:
>>>
 some stack use info as used in web app RevIgniter:

 https://revigniter.com/userGuide/general/using_stacks.html

 by the way, RevIgniter is a self-contained framework that you might find
 useful for all kinds of web development in livecode.

 It might be a little different than your own programming style, but John
 Craig's creation is a living example of the "Model-View-Controller"

>>> concept.
>>>
 --
 Stephen Barncard - Sebastopol Ca. USA -
 mixstream.org

 On Sun, Jan 8, 2017 at 12:34 PM, Stephen Barncard 
 wrote:

 here's some basics from the docs
>
> http://lessons.livecode.com/m/4070/l/36656-how-do-i-use-
> stacks-with-livecode-server
>
> --
> Stephen Barncard - Sebastopol Ca. USA -
> mixstream.org
>
> On Sun, Jan 8, 2017 at 12:17 PM, Rick Harrison via use-livecode <
> use-livecode@lists.runrev.com> wrote:
>
> Hi Stephen,
>>
>> That sounds promising.. do you know of any good examples?
>>
>> Thanks,
>>
>> Rick
>>
>> On Jan 8, 2017, at 3:12 PM, Stephen Barncard via use-livecode <
>>>
>> use-livecode@lists.runrev.com> wrote:
>>
>>> stacks are great with LC server. For instance, one can use custom
>>> properties and libraries just by 'start using' that stack.
>>>
>>> I'm not sure about fields but I think they are accessible too.
>>>
>>> And one can test and edit everything 'on the ground' first.
>>>
>> ___
>> use-livecode mailing list
>> use-livecode@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@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@lists.runrev.com
>>> Please visit this url to subscribe, unsubscribe and manage your
>>> subscription preferences:
>>> http://lists.runrev.com/mailman/listinfo/use-livecode
>>>
>>> 

Re: LC Server & Server Based Stack?

2017-01-08 Thread Phil Davis via use-livecode

Hi Mike,

It sounds like you're talking about things that apply when your server 
stack is used in a long-running LC process. If you run in CGI mode, you 
don't have to deal with some of those things (like figuring out when to 
reload a stack). Personally I'm glad the on-rev default is CGI mode.


Best -
Phil Davis



On 1/8/17 7:26 PM, Mike Bonner via use-livecode wrote:

Sorry I didn't get back to you till now, but it looks like things are
covered as far as accessing a stack file from lc server.  As for the other
direction, (lc server talking to an in memory stack..)  FROM the stack
itself would be a simple http request, but the reverse not so much.

I'm now curious though.  If one were to change an lc stack file, and have
your executing stack look for an updated timestamp ever so often, you could
have it unload the old version, and reload the freshly updated one for
processing possibly.  Though it would probably be simpler to have lc server
write to a file and just load whatever new data from the file with the
stack.

Or, if the stack doesn't need to be running all the time, lc server could
shell call the stack executable (perhaps a simple stackrunner) that would
take an external stackfile name as a parameter to do whatever it is you
need to do.

Also, depending on what you need to do, the httpd stack by andre garzia is
pretty awesome.  (it would bipass the need for lc server, but is single
threaded so might not be appropriate for some things)Its been a while
since I messed with it, but when I did, I set up an android app that took
in swipes and clicks and sent the information to the httpd  stack (and at
the time I had managed to build a "click" external.. its probably here
somewhere).. basically i had a home brew computer remote control app that
was incredibly simple to build, and worked great.  If it fits your use
case, that httpd stack is awesome.

On Sun, Jan 8, 2017 at 6:39 PM, Rick Harrison via use-livecode <
use-livecode@lists.runrev.com> wrote:


Hi Stephen, Phil, & Jacque,

Thanks for the info!  I’ll get back to you after studying this stuff.

Rick


On Jan 8, 2017, at 3:42 PM, Stephen Barncard via use-livecode <

use-livecode@lists.runrev.com> wrote:

some stack use info as used in web app RevIgniter:

https://revigniter.com/userGuide/general/using_stacks.html

by the way, RevIgniter is a self-contained framework that you might find
useful for all kinds of web development in livecode.

It might be a little different than your own programming style, but John
Craig's creation is a living example of the "Model-View-Controller"

concept.

--
Stephen Barncard - Sebastopol Ca. USA -
mixstream.org

On Sun, Jan 8, 2017 at 12:34 PM, Stephen Barncard 
wrote:


here's some basics from the docs

http://lessons.livecode.com/m/4070/l/36656-how-do-i-use-
stacks-with-livecode-server

--
Stephen Barncard - Sebastopol Ca. USA -
mixstream.org

On Sun, Jan 8, 2017 at 12:17 PM, Rick Harrison via use-livecode <
use-livecode@lists.runrev.com> wrote:


Hi Stephen,

That sounds promising.. do you know of any good examples?

Thanks,

Rick


On Jan 8, 2017, at 3:12 PM, Stephen Barncard via use-livecode <

use-livecode@lists.runrev.com> wrote:

stacks are great with LC server. For instance, one can use custom
properties and libraries just by 'start using' that stack.

I'm not sure about fields but I think they are accessible too.

And one can test and edit everything 'on the ground' first.

___
use-livecode mailing list
use-livecode@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@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@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@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


--
Phil Davis


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Re: LC Server & Server Based Stack?

2017-01-08 Thread Mike Bonner via use-livecode
Sorry I didn't get back to you till now, but it looks like things are
covered as far as accessing a stack file from lc server.  As for the other
direction, (lc server talking to an in memory stack..)  FROM the stack
itself would be a simple http request, but the reverse not so much.

I'm now curious though.  If one were to change an lc stack file, and have
your executing stack look for an updated timestamp ever so often, you could
have it unload the old version, and reload the freshly updated one for
processing possibly.  Though it would probably be simpler to have lc server
write to a file and just load whatever new data from the file with the
stack.

Or, if the stack doesn't need to be running all the time, lc server could
shell call the stack executable (perhaps a simple stackrunner) that would
take an external stackfile name as a parameter to do whatever it is you
need to do.

Also, depending on what you need to do, the httpd stack by andre garzia is
pretty awesome.  (it would bipass the need for lc server, but is single
threaded so might not be appropriate for some things)Its been a while
since I messed with it, but when I did, I set up an android app that took
in swipes and clicks and sent the information to the httpd  stack (and at
the time I had managed to build a "click" external.. its probably here
somewhere).. basically i had a home brew computer remote control app that
was incredibly simple to build, and worked great.  If it fits your use
case, that httpd stack is awesome.

On Sun, Jan 8, 2017 at 6:39 PM, Rick Harrison via use-livecode <
use-livecode@lists.runrev.com> wrote:

> Hi Stephen, Phil, & Jacque,
>
> Thanks for the info!  I’ll get back to you after studying this stuff.
>
> Rick
>
> > On Jan 8, 2017, at 3:42 PM, Stephen Barncard via use-livecode <
> use-livecode@lists.runrev.com> wrote:
> >
> > some stack use info as used in web app RevIgniter:
> >
> > https://revigniter.com/userGuide/general/using_stacks.html
> >
> > by the way, RevIgniter is a self-contained framework that you might find
> > useful for all kinds of web development in livecode.
> >
> > It might be a little different than your own programming style, but John
> > Craig's creation is a living example of the "Model-View-Controller"
> concept.
> >
> > --
> > Stephen Barncard - Sebastopol Ca. USA -
> > mixstream.org
> >
> > On Sun, Jan 8, 2017 at 12:34 PM, Stephen Barncard 
> > wrote:
> >
> >> here's some basics from the docs
> >>
> >> http://lessons.livecode.com/m/4070/l/36656-how-do-i-use-
> >> stacks-with-livecode-server
> >>
> >> --
> >> Stephen Barncard - Sebastopol Ca. USA -
> >> mixstream.org
> >>
> >> On Sun, Jan 8, 2017 at 12:17 PM, Rick Harrison via use-livecode <
> >> use-livecode@lists.runrev.com> wrote:
> >>
> >>> Hi Stephen,
> >>>
> >>> That sounds promising.. do you know of any good examples?
> >>>
> >>> Thanks,
> >>>
> >>> Rick
> >>>
>  On Jan 8, 2017, at 3:12 PM, Stephen Barncard via use-livecode <
> >>> use-livecode@lists.runrev.com> wrote:
> 
>  stacks are great with LC server. For instance, one can use custom
>  properties and libraries just by 'start using' that stack.
> 
>  I'm not sure about fields but I think they are accessible too.
> 
>  And one can test and edit everything 'on the ground' first.
> >>>
> >>> ___
> >>> use-livecode mailing list
> >>> use-livecode@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@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@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@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Re: LC Server & Server Based Stack?

2017-01-08 Thread Rick Harrison via use-livecode
Hi Stephen, Phil, & Jacque,

Thanks for the info!  I’ll get back to you after studying this stuff.

Rick

> On Jan 8, 2017, at 3:42 PM, Stephen Barncard via use-livecode 
>  wrote:
> 
> some stack use info as used in web app RevIgniter:
> 
> https://revigniter.com/userGuide/general/using_stacks.html
> 
> by the way, RevIgniter is a self-contained framework that you might find
> useful for all kinds of web development in livecode.
> 
> It might be a little different than your own programming style, but John
> Craig's creation is a living example of the "Model-View-Controller" concept.
> 
> --
> Stephen Barncard - Sebastopol Ca. USA -
> mixstream.org
> 
> On Sun, Jan 8, 2017 at 12:34 PM, Stephen Barncard 
> wrote:
> 
>> here's some basics from the docs
>> 
>> http://lessons.livecode.com/m/4070/l/36656-how-do-i-use-
>> stacks-with-livecode-server
>> 
>> --
>> Stephen Barncard - Sebastopol Ca. USA -
>> mixstream.org
>> 
>> On Sun, Jan 8, 2017 at 12:17 PM, Rick Harrison via use-livecode <
>> use-livecode@lists.runrev.com> wrote:
>> 
>>> Hi Stephen,
>>> 
>>> That sounds promising.. do you know of any good examples?
>>> 
>>> Thanks,
>>> 
>>> Rick
>>> 
 On Jan 8, 2017, at 3:12 PM, Stephen Barncard via use-livecode <
>>> use-livecode@lists.runrev.com> wrote:
 
 stacks are great with LC server. For instance, one can use custom
 properties and libraries just by 'start using' that stack.
 
 I'm not sure about fields but I think they are accessible too.
 
 And one can test and edit everything 'on the ground' first.
>>> 
>>> ___
>>> use-livecode mailing list
>>> use-livecode@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@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@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Re: LC Server & Server Based Stack?

2017-01-08 Thread Phil Davis via use-livecode

On 1/8/17 12:12 PM, Stephen Barncard via use-livecode wrote:

stacks are great with LC server. For instance, one can use custom
properties and libraries just by 'start using' that stack.

I'm not sure about fields but I think they are accessible too.

And one can test and edit everything 'on the ground' first.


This is my preferred method by far, at least for what I do. My 
"index.lc" landing page looks like this:


Hi Pingdom!"
exit to top
end if

set the errormode to "inline"

-- use lib folder as the default folder
put url ("file:/home/myaccount/myproject/config/libfolder") into tLibFolder
set the defaultFolder to tLibFolder

try -- let the stack script respond to the request
start using stack "projectname.livecode"
catch tErr -- error messages from 'throw' commands
put "ERROR:" & CR before tErr
replace CR with "" in tErr
put tErr
end try
?>

Then the "projectname.livecode" library stack put other stacks into use 
depending on the nature of the request, and together they do absolutely 
everything. (They merge data into pre-made HTML pages and serve them, 
but also keep track of training accounts, titles, licensing, training 
sessions, you name it.)


Names have been changed to protect the innocent. ("Dragnet" music plays 
in background)


Phil Davis



On Sun, Jan 8, 2017 at 10:37 AM, Rick Harrison via use-livecode <
use-livecode@lists.runrev.com> wrote:


I’m trying to find out if anyone has ever
gotten a LC server to successfully interact
with a LC Stack running on the same server
such that one can read and write information
to fields on such a stack.




--
Stephen Barncard - Sebastopol Ca. USA -
mixstream.org
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


--
Phil Davis


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Re: LC Server & Server Based Stack?

2017-01-08 Thread J. Landman Gay via use-livecode
My site is focused on old-style CGI. It's an alternative to LC server 
scripts, which act more like PHP,. Both are viable methods but slightly 
different.


--
Jacqueline Landman Gay | jac...@hyperactivesw.com
HyperActive Software   | http://www.hyperactivesw.com



On January 8, 2017 2:49:16 PM Stephen Barncard via use-livecode 
 wrote:



Jacque's site is a great resource for livecode server information.

http://www.hyperactivesw.com/cgitutorial/scripts4.html

there doesn't appear to be many of us, but we who use LC server will
probably never have to use PHP very much any more for our web programming.

And the open source version is the only version!

I improperly credited John Craig for RevIgniter, which of course was
written by Ralf Bitter. Sorry about that.

--
Stephen Barncard - Sebastopol Ca. USA -
mixstream.org

On Sun, Jan 8, 2017 at 12:42 PM, Stephen Barncard 
wrote:


some stack use info as used in web app RevIgniter:

https://revigniter.com/userGuide/general/using_stacks.html

by the way, RevIgniter is a self-contained framework that you might find
useful for all kinds of web development in livecode.

It might be a little different than your own programming style, but John
Craig's creation is a living example of the "Model-View-Controller"
concept.

--
Stephen Barncard - Sebastopol Ca. USA -
mixstream.org

On Sun, Jan 8, 2017 at 12:34 PM, Stephen Barncard 
wrote:


here's some basics from the docs

http://lessons.livecode.com/m/4070/l/36656-how-do-i-use-stac
ks-with-livecode-server

--
Stephen Barncard - Sebastopol Ca. USA -
mixstream.org

On Sun, Jan 8, 2017 at 12:17 PM, Rick Harrison via use-livecode <
use-livecode@lists.runrev.com> wrote:


Hi Stephen,

That sounds promising.. do you know of any good examples?

Thanks,

Rick

> On Jan 8, 2017, at 3:12 PM, Stephen Barncard via use-livecode <
use-livecode@lists.runrev.com> wrote:
>
> stacks are great with LC server. For instance, one can use custom
> properties and libraries just by 'start using' that stack.
>
> I'm not sure about fields but I think they are accessible too.
>
> And one can test and edit everything 'on the ground' first.

___
use-livecode mailing list
use-livecode@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@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@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: LC Server & Server Based Stack?

2017-01-08 Thread Stephen Barncard via use-livecode
Jacque's site is a great resource for livecode server information.

http://www.hyperactivesw.com/cgitutorial/scripts4.html

there doesn't appear to be many of us, but we who use LC server will
probably never have to use PHP very much any more for our web programming.

And the open source version is the only version!

I improperly credited John Craig for RevIgniter, which of course was
written by Ralf Bitter. Sorry about that.

--
Stephen Barncard - Sebastopol Ca. USA -
mixstream.org

On Sun, Jan 8, 2017 at 12:42 PM, Stephen Barncard 
wrote:

> some stack use info as used in web app RevIgniter:
>
> https://revigniter.com/userGuide/general/using_stacks.html
>
> by the way, RevIgniter is a self-contained framework that you might find
> useful for all kinds of web development in livecode.
>
> It might be a little different than your own programming style, but John
> Craig's creation is a living example of the "Model-View-Controller"
> concept.
>
> --
> Stephen Barncard - Sebastopol Ca. USA -
> mixstream.org
>
> On Sun, Jan 8, 2017 at 12:34 PM, Stephen Barncard 
> wrote:
>
>> here's some basics from the docs
>>
>> http://lessons.livecode.com/m/4070/l/36656-how-do-i-use-stac
>> ks-with-livecode-server
>>
>> --
>> Stephen Barncard - Sebastopol Ca. USA -
>> mixstream.org
>>
>> On Sun, Jan 8, 2017 at 12:17 PM, Rick Harrison via use-livecode <
>> use-livecode@lists.runrev.com> wrote:
>>
>>> Hi Stephen,
>>>
>>> That sounds promising.. do you know of any good examples?
>>>
>>> Thanks,
>>>
>>> Rick
>>>
>>> > On Jan 8, 2017, at 3:12 PM, Stephen Barncard via use-livecode <
>>> use-livecode@lists.runrev.com> wrote:
>>> >
>>> > stacks are great with LC server. For instance, one can use custom
>>> > properties and libraries just by 'start using' that stack.
>>> >
>>> > I'm not sure about fields but I think they are accessible too.
>>> >
>>> > And one can test and edit everything 'on the ground' first.
>>>
>>> ___
>>> use-livecode mailing list
>>> use-livecode@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@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: LC Server & Server Based Stack?

2017-01-08 Thread Stephen Barncard via use-livecode
some stack use info as used in web app RevIgniter:

https://revigniter.com/userGuide/general/using_stacks.html

by the way, RevIgniter is a self-contained framework that you might find
useful for all kinds of web development in livecode.

It might be a little different than your own programming style, but John
Craig's creation is a living example of the "Model-View-Controller" concept.

--
Stephen Barncard - Sebastopol Ca. USA -
mixstream.org

On Sun, Jan 8, 2017 at 12:34 PM, Stephen Barncard 
wrote:

> here's some basics from the docs
>
> http://lessons.livecode.com/m/4070/l/36656-how-do-i-use-
> stacks-with-livecode-server
>
> --
> Stephen Barncard - Sebastopol Ca. USA -
> mixstream.org
>
> On Sun, Jan 8, 2017 at 12:17 PM, Rick Harrison via use-livecode <
> use-livecode@lists.runrev.com> wrote:
>
>> Hi Stephen,
>>
>> That sounds promising.. do you know of any good examples?
>>
>> Thanks,
>>
>> Rick
>>
>> > On Jan 8, 2017, at 3:12 PM, Stephen Barncard via use-livecode <
>> use-livecode@lists.runrev.com> wrote:
>> >
>> > stacks are great with LC server. For instance, one can use custom
>> > properties and libraries just by 'start using' that stack.
>> >
>> > I'm not sure about fields but I think they are accessible too.
>> >
>> > And one can test and edit everything 'on the ground' first.
>>
>> ___
>> use-livecode mailing list
>> use-livecode@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@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: LC Server & Server Based Stack?

2017-01-08 Thread Stephen Barncard via use-livecode
here's some basics from the docs

http://lessons.livecode.com/m/4070/l/36656-how-do-i-use-stacks-with-livecode-server

--
Stephen Barncard - Sebastopol Ca. USA -
mixstream.org

On Sun, Jan 8, 2017 at 12:17 PM, Rick Harrison via use-livecode <
use-livecode@lists.runrev.com> wrote:

> Hi Stephen,
>
> That sounds promising.. do you know of any good examples?
>
> Thanks,
>
> Rick
>
> > On Jan 8, 2017, at 3:12 PM, Stephen Barncard via use-livecode <
> use-livecode@lists.runrev.com> wrote:
> >
> > stacks are great with LC server. For instance, one can use custom
> > properties and libraries just by 'start using' that stack.
> >
> > I'm not sure about fields but I think they are accessible too.
> >
> > And one can test and edit everything 'on the ground' first.
>
> ___
> use-livecode mailing list
> use-livecode@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@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: LC Server & Server Based Stack?

2017-01-08 Thread Rick Harrison via use-livecode
Hi Stephen,

That sounds promising.. do you know of any good examples?

Thanks,

Rick

> On Jan 8, 2017, at 3:12 PM, Stephen Barncard via use-livecode 
>  wrote:
> 
> stacks are great with LC server. For instance, one can use custom
> properties and libraries just by 'start using' that stack.
> 
> I'm not sure about fields but I think they are accessible too.
> 
> And one can test and edit everything 'on the ground' first.

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: LC Server & Server Based Stack?

2017-01-08 Thread Stephen Barncard via use-livecode
stacks are great with LC server. For instance, one can use custom
properties and libraries just by 'start using' that stack.

I'm not sure about fields but I think they are accessible too.

And one can test and edit everything 'on the ground' first.

On Sun, Jan 8, 2017 at 10:37 AM, Rick Harrison via use-livecode <
use-livecode@lists.runrev.com> wrote:

> I’m trying to find out if anyone has ever
> gotten a LC server to successfully interact
> with a LC Stack running on the same server
> such that one can read and write information
> to fields on such a stack.
>



--
Stephen Barncard - Sebastopol Ca. USA -
mixstream.org
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Re: LC Server & Server Based Stack?

2017-01-08 Thread Rick Harrison via use-livecode
Hi Mike,

I’m looking at all options here.  So yes, I’d like to 
be able to do the first option, and would like to
know if the second option is possible, and if there
are any examples out there for it.  Both animals
would be welcome in the barn so long as they
can co-exist with each other.

Thanks,

Rick

> On Jan 8, 2017, at 1:52 PM, Mike Bonner via use-livecode 
>  wrote:
> 
> If you mean a simple interaction, IE lc server loads the stack, gets or
> changes something on the stack, and save the changes to the stack, thats a
> pretty straight forward thing.  If you mean inter-process communication
> between lc server and an actively running stack, thats a different animal
> entirely.

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Re: LC Server & Server Based Stack?

2017-01-08 Thread Mike Bonner via use-livecode
If you mean a simple interaction, IE lc server loads the stack, gets or
changes something on the stack, and save the changes to the stack, thats a
pretty straight forward thing.  If you mean inter-process communication
between lc server and an actively running stack, thats a different animal
entirely.

On Sun, Jan 8, 2017 at 11:37 AM, Rick Harrison via use-livecode <
use-livecode@lists.runrev.com> wrote:

> Hi there,
>
> I’m trying to find out if anyone has ever
> gotten a LC server to successfully interact
> with a LC Stack running on the same server
> such that one can read and write information
> to fields on such a stack.
>
> If so, could you please point me to some good
> examples or other resources for this?
>
> Thanks,
>
> Rick
> ___
> use-livecode mailing list
> use-livecode@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@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode