Preferred Multi-Platform Development Method
Devin Asay
devin_asay at byu.edu
Fri May 8 18:00:54 EDT 2009
On May 8, 2009, at 3:31 PM, David Beck wrote:
> My only question is where to store the preferences that we are storing
> in the Windows Registry. We do have a mechanism to store preferences,
> but there are certain preferences that are system wide, and should not
> change based on the user of the computer (e.g. the install path of a
> standalone application, etc.). Any advice on where to store these
> global
> system-wide preferences on the Mac?
The common place for storing global preferences or settings is in /
Library or possibly /Library/Application Support/, depending on the
type of files you're saving. The latter is what you get with
specialFolderPath("asup"). Typically developers create their own
directories in that folder: /Library/Application Support/MyApp, then
store their files there.
>
>
> Richard, I understand you are using a stackfile for preferences. How
> exactly do you implement this? That is, what calls do you use to get
> and
> set preferences in the stackfile? Does the folder you mentioned
> (specialApplicationFolder("preferences")) change based on the current
> user or is it system wide? Also, are there any permissions issues to
> be
> careful about?
specialFolderPath("Preferences") is per user. But there are lots of
folders you can derive with this function. See Ken Ray's excellent
compilation at:
http://www.sonsothunder.com/devres/revolution/tips/file010.htm
As for permissions, I think the folders in the /Library directory
require administrator permissions, but obviously any user can write
anywhere in their own home directory. Others will have more things to
add to this, I'm sure.
Regards,
Devin
Devin Asay
Humanities Technology and Research Support Center
Brigham Young University
More information about the use-livecode
mailing list