Stack check-out/check-in

Paul Dupuis paul at researchware.com
Mon Jan 25 20:06:50 EST 2021


If the could storage the stack is on has write access, the easiest 
mechanism is a file based flag.

When the stack is launched, if checks:

if there is a file <filespec> then
   -- the stack is already open, so exit
else
    put empty into URL ("file:"&<filespec>) -- creates a empty file to 
mark as open
end

and  when the stack exists remove the file

on quit
   delete file <filespec>
end quit

Or something like that. I do not have LC open to check my code above.


On 1/25/2021 7:24 PM, Marty Knapp via use-livecode wrote:
> I have an app that allows user to create specialized editable documents (stacks) that open in my app. Some customers use Dropbox, iCloud, OneDrive or similar to store these documents so that they can be accessed from 2 different computers. Is there a way to tell if a stack is already open on one computer? I need to prevent them from opening a 2nd instance of the stack on the other computer so that Dropbox (or other cloud sync service) does not create a conflicted copy.
>
> If there is not a way to tell, has anyone created some sort of stack check-out/check-in system that they'd be willing to share? I need this for Mac, PC and mixed.
>
> Marty
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode





More information about the use-livecode mailing list