realbasic-nug
[Top] [All Lists]

Re: How to read binary plist files with RB?

To: REALbasic NUG <realbasic-nug@lists.realsoftware.com>
Subject: Re: How to read binary plist files with RB?
From: James Sentman <james@sentman.com>
Date: Fri, 30 Jan 2009 13:24:14 -0500
Authentication-results: mx.google.com; spf=neutral (google.com: 74.124.194.228 is neither permitted nor denied by best guess record for domain of realbasic-nug-bounces@lists.realsoftware.com) smtp.mail=realbasic-nug-bounces@lists.realsoftware.com
Delivered-to: listarchive@realsoftware.com
In-reply-to: <89fe53800901291155o163f5cd4o1e97bc3f614c3011@mail.gmail.com>
References: <30A06B96-3813-4053-BBF6-5C56253E7046@mac.com> <D90A202B-CB7B-4CDA-AC02-71966DBA2224@declareSub.com> <7D5015B0-3B30-4C1A-9E34-585B6F08505F@mac.com> <8EF06EB3-1D74-413C-BFB4-17414F7F42A8@mac.com> <D8563407-C21F-4FD4-A675-26760EF830AF@mac.com> <89fe53800901291155o163f5cd4o1e97bc3f614c3011@mail.gmail.com>
Reply-to: REALbasic NUG <realbasic-nug@lists.realsoftware.com>
Sender: realbasic-nug-bounces@lists.realsoftware.com

On Jan 29, 2009, at 2:55 PM, Thomas Tempelmann wrote:

Using the system frameworks for reading/writing system standard file
formats is a MUST in my opinion. It makes your app "future proof" to a
degree.

Well, it makes relying on an "hidden"engine and it does not please to me.

What?!!

You'd be using the same functions that Apple recommends using, and
you'd be using the same in XCode (or their NS... counterparts). What
do you see wrong with that?


I believe, though sitting here thinking about it I cannot recall WHY I believe this so it might be wrong, that a binary plist file is really just a serialized CF data object. In our case a CFDictionary or a CFArray or something. The system has methods for reading and writing these and the actual format that it creates binarywise is not documented by apple so that they have freedom to change it as necessary as the system evolves. As long as the calls to read and write remain compatible with old versions they maintain compatibility with older software regardless. This is much faster to load and parse and uses less disk space than converting back and forth to XML would each time. So you really shouldn't try to parse these out yourself, but use the methods as already outlined in this thread to reconstitute the CF data structures from the disk data.

Thanks,
 James


James Sentman                       http://sentman.com          
http://MacHomeAutomation.com




_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>


<Prev in Thread] Current Thread [Next in Thread>