unreliable file deletion via script
Mark Talluto
userev at canelasoftware.com
Tue May 10 17:38:07 EDT 2005
On May 10, 2005, at 2:19 PM, Kurt Kaufman wrote:
> I have a group of 950 small (25k) record stacks, each of which
> contains a separate business account. I have 2 shared stacks
> "PPR.rev" and "paymentReceipt.rev", as well as two "anchor"
> standalones. The standalones serve only as navigational tools to
> open up PPR and paymentReceipt. From PPR, it is possible to open
> any of the 950 record stacks.
>
> Whenever any stack is opened, it creates (from a preopencard
> script) a Busy*.txt file, such as "BusypaymentReceipt.txt". This
> is to prevent more than one person accessing a stack at a time.
> All of the stacks have in their closestack script that which
> deletes the Busy file, for instance:
>
> if there is a file "BusypaymentReceipt.txt" then delete file
> "BusypaymentReceipt.txt"
>
> This almost always works perfectly, but sometimes, a closing stack
> for some reason fails to delete its Busy file. I can manually
> delete the file if needed, but that's obviously not what I
> intended, and I certainly don't want to ask anyone else to do so!
> Does anyone have any ideas why the busy file deletion is not
> entirely reliable? Script problem?
>
> I have this app in operation on WinXP Pro, and the stacks and
> standalones were built using Rev 2.02. I do have Rev 2.5.1 on Mac
> OSX, so I suppose I could recreate the
Hi Kurt,
You might try deleting as you have. On the very next line, try:
wait 10 ticks. This will cause Rev to do its thing and wait for a
moment. My might try adjusting that value to better suit your
needs. This is just a guess. It is what I would try first at least.
Mark Talluto
--
CANELA Software
http://www.canelasoftware.com
More information about the use-livecode
mailing list