Re: NSDictionary, Files, and NSURL
Re: NSDictionary, Files, and NSURL
- Subject: Re: NSDictionary, Files, and NSURL
- From: Nick Zitzmann <email@hidden>
- Date: Fri, 26 Mar 2004 16:07:33 -0700
On Mar 26, 2004, at 3:36 PM, Seth Willits wrote:
From what I see, a dictionary written to a file can only contain
NSData, NSDate, NSNumber, NSString, NSArray, and NSDictionary objects.
Since I want to also store URLs to other files, I'm assuming I'll need
to get the POSIX path for the URL and store that instead. Although
it's an extra step to take, it's certainly an easy one. Is there
another clever way to go about this or am I looking at my only option?
I'm assuming these URLs are in the form of NSURL objects... If my
assumption is correct, then the documentation states that NSURL
supports the NSCoding protocol, so you could use NS(Keyed)Archiver to
turn the NSURL objects into NSData and store them that way if you wish.
Or you could get the URL string from the URL and store that.
Nick Zitzmann
<
http://www.chronosnet.com/>
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.