Thanks for the help. CFPropertyLitsCreateXMLData should be a good
solution for me. The NSDictionary only contains NSStrings and
NSNumbers. And, I can't use Cocoa APIs because the tool is set uid root.
But I must ask again, why exactly can't I use a raw byte stream? You
seem to be implying that it's logically impossible -- yet
NSUnarchiver can interpret the data. I don't see why it would be
impossible to do with a Carbon function. Unless, of course, that
function has yet to exist..?
Thanks again.
Morgan
On Jun 26, 2007, at 10:06 AM, Chris Hanson wrote:
On Jun 26, 2007, at 3:28 AM, Morgan Davis wrote:
How can I read this NSDictionary/CFDictionary into my tool using
only C and Carbon APIs? Thank you. :)
You can't. You're passing an archived graph of objects to your
tool; if you want to use it, you need to unarchive it. What
prevents you from just using NSUnarchiver in this code?
As Eric said, if this is truly important to you, you can replace
your use of NSArchiver and NSUnarchiver with
CFPropertyListCreateXMLData and CFPropertyListCreateFromXMLData.
Note at that you need to do this on both sides of the equation, and
you can only pass instances of the basic property list classes this
way; you lose the ability to pass arbitrary objects.
Still, I question the need for this. NSUnarchiver should be
sufficient for your needs, and you've indicated that it already
works. Why change it now?
-- Chris
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Carbon-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/carbon-dev/email@hidden