• 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 round trip?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSDictionary round trip?


  • Subject: Re: NSDictionary round trip?
  • From: "email@hidden" <email@hidden>
  • Date: Wed, 23 Aug 2006 08:15:32 -0700

As an FYI, it appears that NSKeyedArchiver and NSKeyedUnarchiver seem to be the preferred methods (replacing the older ones mentioned below). for OS 10.2 or later

On Aug 18, 2006, at 8:27 PM, Mark Dawson wrote:

I see there is a - (NSString *)description that converts the NSDictionary into a string; however, is there a way of taking that string and creating a dictionary from it? I didn't see any init methods like this. I'd like to send a dictionary to a thread (or across a network) and recieve a dictionary in return?

One way would be to transmit bytes from NSData

on the sending end...

NSData* theDataToSend = [NSArchiver archivedDataWithRootObject:yourDictionary];
// send the bytes from the data object


on the receiving end...

NSData* theData = build up with received bytes
NSDictionary* theDictionary = [NSUnarchiver unarchiveObjectWithData:theSentData];


___________________________________________________________
Ricky A. Sharp         mailto:email@hidden
Instant Interactive(tm)   http://www.instantinteractive.com


_______________________________________________ Do not post admin requests to the list. They will be ignored. Cocoa-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
References: 
 >NSDictionary round trip? (From: Mark Dawson <email@hidden>)
 >Re: NSDictionary round trip? (From: Ricky Sharp <email@hidden>)

  • Prev by Date: NSDocument file association question
  • Next by Date: Re: Re: Threads and synchronization
  • Previous by thread: Re: NSDictionary round trip?
  • Next by thread: Re: NSDictionary round trip?
  • Index(es):
    • Date
    • Thread