Lock On Folder

LiveCode is the premier environment for creating multi-platform solutions for all major operating systems - Windows, Mac OS X, Linux, the Web, Server environments and Mobile platforms. Brand new to LiveCode? Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
warrenk
Posts: 110
Joined: Sun Sep 21, 2008 5:39 am

Lock On Folder

Post by warrenk » Fri Sep 26, 2008 6:41 pm

I have a application that creates a folder. After the folder is created, I am trying to manually delete it and I get the message that the folder is in use. One of the last statements I put on the mouseup command of the button is...

set the destroyStack of this stack to true

Should this release the folder? If not...what command would I use. When I close my application, I am able to delete the folder.

Warren

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10044
Joined: Sat Apr 08, 2006 7:05 am
Contact:

Post by FourthWorld » Fri Sep 26, 2008 7:50 pm

Is there anything in the folder?

If on OS X, remember that the OS sometimes creates invisible files, like .DS_Store.

You might try setting the defaultFolder to it and getting the files, to see if there's anything in there that isn't otherwise evident.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn

Mark
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 5150
Joined: Thu Feb 23, 2006 9:24 pm
Contact:

Post by Mark » Fri Sep 26, 2008 8:51 pm

Hi Warren,

This typically happens when you write to a file but don't close the file. Make sure that you always close a file after opening and writing to it.

What exactly happens "after the folder is created" but before you try to "manually delete it"?

Best,

Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode

warrenk
Posts: 110
Joined: Sun Sep 21, 2008 5:39 am

Post by warrenk » Fri Sep 26, 2008 9:00 pm

I found when the locked folder is the defaultfolder, I couldn't delete it. As long as I specifiy a different folder as the defaultfolder...the file is not locked.

Thanks for everyones help in trying to fix this!
Warren
Last edited by warrenk on Fri Sep 26, 2008 9:42 pm, edited 1 time in total.

Mark
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 5150
Joined: Thu Feb 23, 2006 9:24 pm
Contact:

Post by Mark » Fri Sep 26, 2008 9:34 pm

Hi Warren,

Can you post your script while I do a test? (This is relevant for me, as I'm working on an installation software package).

Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode

Post Reply