On 31 Mar 2005, at 13:20, Thomas Reed wrote:
If you're doing cross-platform work, though, you can mimic this
behavior with a class that reads from a file into a dictionary pretty
easily. Somebody (Kevin Ballard, maybe?) has a class for turning XML
into a dictionary and vice versa, though I forget what it's called and
have never used it.
This is exactly what I have done. I use Kevin's XMLDictionary which
can read and write .plist files and the module I mentioned before to
access the values in the dictionary. It is extremely simple. I don't
have to access the dictionary directly at all (unless I want to).
This was great for me, because I used to use the built-in OS X API for
accessing prefs, but ran into trouble when porting to Windows. I
didn't want to maintain two code-bases, so I replaced the OS X API with
calls into the dictionary, which is handled by Kevins class. Not only
did this mean I was working with one code base, but it was
backward-compatible with the old .plist pref files.
--
Charlie Boisseau
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>
|