specialFolderPaths
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
-
- Posts: 50
- Joined: Sun Jun 30, 2013 1:43 am
- Location: Illinois
- Contact:
Re: specialFolderPaths
I have a theory: the dataStorage.livecode stack that I am trying to copy to the specialFolderPath("support") location is listed in my Standalone Applications Settings in the Copy Files pane. I do not list it in the Stacks pane. I noticed that a few of the stacks in my build (not all) that are listed in the Stacks pane are located outside of the "Resources" folder inside the application bundle. Perhaps when the engine uses revCopy to make a copy of a stack, it must first have a copy located in the directory with the executable (outside of the Resources folder)?
-
- Posts: 50
- Joined: Sun Jun 30, 2013 1:43 am
- Location: Illinois
- Contact:
Re: specialFolderPaths
The script that contains the revCopy command to duplicate the stack into the "support" folder also creates three .txt files in the support folder. So I do set the defaultFolder to specialFolderPath("support").
Re: specialFolderPaths
Interesting. Later this evening I should be able to build a test.
Brian Milby
Script Tracker https://github.com/bwmilby/scriptTracker
Script Tracker https://github.com/bwmilby/scriptTracker
-
- Posts: 50
- Joined: Sun Jun 30, 2013 1:43 am
- Location: Illinois
- Contact:
Re: specialFolderPaths
For what it is worth, I'm using LC9.0.0. I've used this same method (copying an app listed in the Stacks pane and storing data in them) in apps from a couple of years ago - except I copied to specialFolderPath("documents") and I created the apps in LC7. Otherwise my code is essentially the same.
Re: specialFolderPaths
I'm unable to reproduce the behavior that you are seeing. I created a test stack (parent) with a button and a couple of fields. The preOpenStack handler copies a stack from the resources special folder path to a fully qualified path. The second stack (empty) is included in the copy files section only - it only has a field where I can put some text to see if changes are saved.
Upon opening the stack, if the file does not exist in the destination folder, it is copied as expected. If it already exists, it is not updated using the revcopyfile handler.
If I get a list of the mainstacks, it is not listed. If I open the stack (empty), then it is listed. Regardless of which version I open (resources or the copied one), I am able to make a change and save it. At no point do I see a copy of the stack get placed in another location.
I did try the Application Support location as well.
Upon opening the stack, if the file does not exist in the destination folder, it is copied as expected. If it already exists, it is not updated using the revcopyfile handler.
If I get a list of the mainstacks, it is not listed. If I open the stack (empty), then it is listed. Regardless of which version I open (resources or the copied one), I am able to make a change and save it. At no point do I see a copy of the stack get placed in another location.
I did try the Application Support location as well.
Brian Milby
Script Tracker https://github.com/bwmilby/scriptTracker
Script Tracker https://github.com/bwmilby/scriptTracker
-
- Posts: 50
- Joined: Sun Jun 30, 2013 1:43 am
- Location: Illinois
- Contact:
Re: specialFolderPaths
Thanks for testing this Brian. I'm in the process or re-writting all storage/retrieval scripts to use text files instead of stacks. When done, I may turn back and look at this issue some more to see if I can find the problem. That would be two days from now.