FROM : marc@mac.com
DATE : Wed Aug 23 17:15:32 2006
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_removed>
> Instant Interactive(tm) http://www.instantinteractive.com
>
DATE : Wed Aug 23 17:15:32 2006
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_removed>
> Instant Interactive(tm) http://www.instantinteractive.com
>
| Related mails | Author | Date |
|---|---|---|
| Mark Dawson | Aug 19, 03:27 | |
| Adam R. Maxwell | Aug 19, 04:01 | |
| Ricky Sharp | Aug 19, 04:03 | |
| Daniel Jalkut | Aug 19, 06:50 | |
| YL | Aug 19, 09:12 | |
| Michael Nickerson | Aug 20, 10:25 | |
| j o a r | Aug 20, 13:35 | |
| Aaron Tuller | Aug 20, 21:29 | |
| Greg Hurrell | Aug 20, 21:47 | |
| marc@mac.com | Aug 23, 17:15 |






Cocoa mail archive

