File sharing, locking, etc... between multiple users...

Jim Ault JimAultWins at yahoo.com
Fri Feb 24 11:25:35 CST 2006


On 2/24/06 6:55 AM, "Jonathan Lynch" <jonathandlynch at gmail.com> wrote:

> I just changed the scripts in Task Mage and Remote Task Mage to use flag
> files... 

Since you are now using flag files, here some ways I use them in one of my
businesses.

1-- The file contains data for another stack or app.  The destination app
looks for the filename every second, and when found reads it, then deletes
it.  Thus the flag is simply the appearance of the file.

2-- This same file is read, deleted, and then written out as
"filenameSTOR.txt" in order to keep the most current version for debugging.

3-- This same file is read, deleted, and a log notation is
put logNotation & cr before url ("File:"& pathh & logFile)

4-- The file is read, copied to another folder, deleted.  The copy appearing
in the second folder will trigger another app to do some processing.

5-- The file is read, actions are taken to produce a result, then that
result is written to a second folder, triggering another app to munch a
bunch.

6-- Occasionally maintenance and interface adjustments require that I
re-read the deleted file.  So, I simply read the filenameSTOR version.  This
is a case where my app reads several different files created by more than
one app, each on its own event loop.

Hope this helps.

Jim Ault
Las Vegas


On 2/24/06 6:55 AM, "Jonathan Lynch" <jonathandlynch at gmail.com> wrote:

> I just changed the scripts in Task Mage and Remote Task Mage to use flag
> files...
> 
> This turns out to be a much more elegant approach. Simplifies things in a
> number of places. These kinds of discussions are very useful for programmers
> who are self-taught.
> 





More information about the use-livecode mailing list