David Glasgow wrote:
I was just reading Sarah Reichelt's tutorial on saving data.
http://www.revjournal.com/tutorials/saving_data_in_revolution.html
I have always saved data to stack in a subfolder of the standalone
containing folder. Of this she says:
"this may cause problems if the application is stored in the
Applications or Program Files folder and the user does not have write
access to that folder."
She is of course quite correct. I have had some problems with this, and
the error reporting by Rev and customers seemed a bit hit and miss.
Can anyone tell me what Rev and Windows does if an attempt is made to
write to a location for which the user does not have the necessary
privileges. I have had described to me three different things:
1/ An endlessly busy cursor.
2/ Absolutely no indication that anything has gone wrong (but no data
saved)
3/ An error report that the path was not "available" (?)
Is this a case for using 'try throw catch' at startup to pre-empt
problems later? If so, what might the script look like?
I would prefer to stick to the subfolder data saving method - unless
anyone can persuade me that there is a much better way to go.
I haven't yet had time to test this, but it should be simple enough on
either OS X or Windows by just creating an account that doesn't have
sufficient privileges to write to the Program Files (Win) or
Applications (OS X) folders.
If memory serves, attempting to write to a folder where you don't have
sufficient permissions will cause the result to contain "can't open file".
On some OSes you can then call the sysError function to determine
further specifics if necessary, but since you've already determined the
critical factor (that you can't write the file) you may not need to.
--
Richard Gaskin
Managing Editor, revJournal
_______________________________________________________
Rev tips, tutorials and more: http://www.revJournal.com
_______________________________________________
use-revolution mailing list
[email protected]
Please visit this url to subscribe, unsubscribe and manage your subscription
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution