Rights to write in Programs folder

Jim Ault JimAultWins at yahoo.com
Thu Dec 22 10:28:51 CST 2005


On 12/22/05 8:01 AM, "David Glasgow" <david at dvglasgow.wanadoo.co.uk> wrote:
> (snip)  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. (snip .. full quote below)

Why not try 
writing a 1 char file to the path
reading the file (which should not return empty)
then if not empty, deleting the 'scout' file
In the case of 'empty', ask the user where to store the data, offering
Desktop, or My Documents ( Desktop, Documents on Mac).

Additionally, getting the path and checking if it is a known problematic
path

User friendly way may be to do a routine that informs the user that you will
be checking for the default storage location success, then, if cool, inform
the result, else let the user choose, if choice is also not workable, stay
in the loop.  On cancel by user, inform that data cannot be saved with the
current settings.

If you are saving data to someone's hard drive, it is nicer to let them know
you will be doing this and where is resides.  Some users will want to
include the data in their backup routines.

Hope this helps.

Jim Ault
Las Vegas

On 12/22/05 8:01 AM, "David Glasgow" <david at dvglasgow.wanadoo.co.uk> 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.
> 
> Best Wishes,
> 
> David Glasgow
> 
> http://www.i-psych.co.uk
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution





More information about the use-livecode mailing list