Page 1 of 1

Lock On Folder

Posted: Fri Sep 26, 2008 6:41 pm
by warrenk
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

Posted: Fri Sep 26, 2008 7:50 pm
by FourthWorld
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.

Posted: Fri Sep 26, 2008 8:51 pm
by Mark
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

Posted: Fri Sep 26, 2008 9:00 pm
by warrenk
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

Posted: Fri Sep 26, 2008 9:34 pm
by Mark
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