Reading and Writing Preferences

MHPrefs is an extremely easy to use Class for reading and writing preferences.

Xojo doesn’t have anything to handle Preferences so I was a happy user of TT’s SmartPreferences (MacOSLib).
However, I needed my App to compile in 64-bit but unfortunately, MacOSLib doesn’t support that.

I made it super easy to use but there is a Note included that explains things. I also included a little sample App.

It currently supports OS X only using NSUserDefaults. When I write a new project for Windows/Linux that needs preferences, I’ll add support for those platforms.

I hope you’ll like it. :slight_smile:

https://dl.dropboxusercontent.com/u/609785/Xojo/MHPrefs/MHPrefs.zip

Is there a way to use this class to access not my app prefs but another app’s plist (specifically com.apple.dock.plist)?

No, unfortunately not.
This class is purely for reading and writing App preferences and uses NSUserDefaults to do so.

There is ‘Dockutil’ with Python source that perhaps can help you on the way: https://github.com/kcrawford/dockutil/blob/master/scripts/dockutil