This content has been marked as final. Show 5 replies
What is the full path you are trying to save to?
Example of failing path:
Usually these are passed as variables such as:
castlib("template").save(userfilepath & userfilename)
> Example of failing path:
> Usually these are passed as variables such as:
> castlib("template").save(userfilepath & userfilename)
What I was driving at is: does the current user have permission to
create/modify files at whatever path?
If a saved castLib already exists there, you could try deleting it
before writing a new one
Hmmm. I opened a text file in Notepad and gave a SaveAs command to same directory. Got permissions error and offer to save to Documents folder.
Curiously, the target folder was a subfolder of users\Tom\Documents. Does Vista lock down subfolders within a user's authorized Documents folder? Even for the Administrator? Yikes!
Since the failed castlib save gives no error message, I'll use baFileExists to confirm file was created. Not sure if I can confirm incremental saves. Can a Director projector check permissions of an external cast file in Vista?
You can use baFile functions to get the date/time of the file.
If you get it prior to the save, do the save, and then check the current one, if they are equal... then the save failed.
Naturally, you can rename the file and save a new one (ba also has support for renames).