Hi Cole,


Thanks for the advice, Michael. I'll probably do something similar in the end. At this point, I'm driven mostly by curiosity. And my lazy side would prefer to only use setpref. ;) I'll whip up a little test projector and see how far I push setpref.

Here comes a similar solution I've been using, wich gave me a reliable pref file from Os8 to X, frm win95 to WinXP, and ok for user with restricted profiles
(using fileXtra4)

on GetPrefsFilePath () ----------------------------------------------------
  -- OUTPUT #string
  -------

  lstrPaths = list()
  if the platform contains "indows" then
    lstrPaths.add("CSIDL_COMMON_APPDATA")
    lstrPaths.add("CSIDL_LOCAL_APPDATA")
    lstrPaths.add("CSIDL_APPDATA")
  else
    lstrPaths.add("kPreferencesFolderType")
    lstrPaths.add("kSystemPreferencesFolderType")
  end if

  xFX = xtra("fileXtra4").new()
  sFolder = ""
  repeat while (sFolder = "")
    if not count(lstrPaths) then exit repeat
    sTarget = lstrPaths[1]
    lstrPaths.deleteAt(1)
    sFolder = xFX.fx_FolderGetSpecialPath(sTarget)
  end repeat

  if (sFolder = "") then return ""

  sDelim   = the last char of the moviePath
  sLogFile = sFolder & "TheProject" &sDelim& "pref.dat"

  return sLogFile
end -- GetPrefsFilePath handler


Because the user pref folder is better than the common one, but this user folder isn't available on all the flavor of each OS. Uing this routine to get the pref file, I never had any bug report.


Cheers,
s�b

[To remove yourself from this list, or to change to digest mode, go to 
http://www.penworks.com/lingo-l.cgi  To post messages to the list, email 
[email protected]  (Problems, email [EMAIL PROTECTED]). Lingo-L is for 
learning and helping with programming Lingo.  Thanks!]

Reply via email to