classPreferences on GitHub

[quote=115231:@Norman Palardy]Hence why I said way back

How it does what it does is pretty straight forward.
Its one module.
Theres one public “Preferences” class you interact with. It’s a Proxy.
It has all the methods for reading & writing booleans, colors, integers, strings etc including dictionaries of things.
Also in the module are are 3 different classes - “preferences providers” - each implements an interface and the Preferences class creates one based on what platform you’re on.
You read & write from the Preferences class and the rest is handled invisibly for you.

It might actually work better as an example in the design patterns examples since that way every has the source if they want to tweak it but you can still just add it to your projects & be done with preferences.[/quote]

Feature request added - (https://xojo.com/issue/34747)>]<https://xojo.com/issue/34747>

Just FYI that it will probably end up as an example as it’s dependent on MacOSLib on the OS X Side
Not sure I want to put that dependency in everyones projects

@Norman, I recently set up a MacOS only class that uses NSUserDefaults without the need to install additional libraries. Currently the most important number values, strings, dictionaries and arrays of them are supported, but it could easily be extended to any other object by implementing NSArchiver, I guess. If this could be interesting for your example let me know.

I would be interested in seeing this class. Are you making it publicly available?

Yes. I created it in the Alpha and therefore have to wait until r3 gets released, but it is part of a currently growing collection which supplies several MacOS-enhanced controls without the need for a bigger lib – each object can be used separately. Therefore a bit overhead on internal declarations, but everything Cocoa only (and Foundation where it’s needed).
Anyway I could send you the Prefs privately after r3 has gone beta if you wish to.

I plan to release them for free but with an optional PayPal link for everyone who considers them useful and wants to contribute a bit if he can afford. A sneak peek into a few of them is here (but in german only for now):
http://xojoblog.wordpress.com/2014/09/21/vorankundigung-macoscontrols/