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: Arnaud Nicolet <anic297@mac.com>
Date: Fri, 30 Jan 2009 10:07:43 +0100
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: <89fe53800901291427i972ea0cm6e24536b7ab52611@mail.gmail.com>
References: <30A06B96-3813-4053-BBF6-5C56253E7046@mac.com> <D90A202B-CB7B-4CDA-AC02-71966DBA2224@declareSub.com> <89fe53800901291101g4efabaccn6dccc04c187da216@mail.gmail.com> <B865E903-6074-4701-9523-6EC5718399F3@mac.com> <89fe53800901291427i972ea0cm6e24536b7ab52611@mail.gmail.com>
Reply-to: REALbasic NUG <realbasic-nug@lists.realsoftware.com>
Sender: realbasic-nug-bounces@lists.realsoftware.com
Le 29 janv. 09 à 23:27 (soir), Thomas Tempelmann a écrit:

(lots of enough-times-repeated-quotes finally removed)

Looking at the code, the CFPreference.Sync method is initialised using the
pointer "CurrentApplication", taken from
CFBundle .CarbonFramework .DataPointerNotRetained("kCFPreferencesCurrentApplication"). This appears to be taken from the Bundle (by the way, it means I can't
debug, just try in the built app).

You're not using the code I gave you. Instead, you are confusing
CFPreference with CFPropertyList.

CFPropertyList is what you need to use, just as I had shown you. Look
at the test code in CoreFoundation._TestSelf, where it says:

  // Test CFBundle and CFPropertyList

About 10 times further down, starting with

  dim rs as new CFReadStream (url)

is the code that reads a plist from a file, modifies it, and writes it back.

That's what you need.

CFPreferences is only for your app's prefs and nothing else.

Ah yes, that makes sense. Thank you!
_______________________________________________
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>