special folders

Jim Ault JimAultWins at yahoo.com
Wed May 2 20:10:17 EDT 2007


On 5/2/07 2:29 PM, "Richard Gaskin" <ambassador at fourthworld.com> wrote:

> Ken Ray wrote:
>> It is therefore useful to use the specialFolderPath() function instead
>> of hardcoding paths - especially when it comes to other languages.
>> Although I don't know this for sure, it wouldn't surprise me to find
>> out that certain folders are named differently in other localized OSes.
> 
> One more reason:  things change.
> 
> For example, specialFolderPath(26) works great on both XP and Vista, but
> returns different values.  Woe be to the developer using hard-coded
> paths....
> 
Does this mean that you should be using something like

repeat with x = 20 to 30
   if (specialFolderPath(x) & "/") contains  "/theFolderIwant/" then
      put x into kaching
      exit repeat
   end if
end repeat
put specialFolderPath(kaching) into fullPathThatIwant

Jim Ault
Las Vegas





More information about the use-livecode mailing list