• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: NSDictionary, Files, and NSURL
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.


References: 
 >NSDictionary, Files, and NSURL (From: Seth Willits <email@hidden>)

  • Prev by Date: NSDictionary, Files, and NSURL
  • Next by Date: Re: Developer Resource site
  • Previous by thread: NSDictionary, Files, and NSURL
  • Next by thread: Re: NSDictionary, Files, and NSURL
  • Index(es):
    • Date
    • Thread