Amazon.com Widgets 19.4
Welcome, Guest. Please login or register.
Did you miss your activation email?
July 29, 2014, 03:41:55 AM
Home Help Search chat Login Register 
News: Read this please.The Great Kangaroo Escape Looking for reviews of the 4th ed on Amazon!   Twitter:  @skochan
                     

+ Official Forum for Programming in Objective-C (the iPhone Programming Language) - Stephen Kochan
|-+ Old Stuff
| |-+ Program Examples
| | |-+ Chapter 19
| | | |-+ 19.4
Pages: [1] Go Down
Print
Author Topic: 19.4 (Read 1102 times)
mdeh
Full Member
***
Posts: 166






on: March 04, 2009, 05:29:50 PM

Code: (Objective-C)
#import <Foundation/NSObject.h>
#import <Foundation/NSString.h>
#import <Foundation/NSDictionary.h>
#import <Foundation/NSKeyedArchiver.h>
#import <Foundation/NSAutoreleasePool.h>

int main (int argc, const char * argv[]) {
    NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
NSDictionary *glossary;

glossary = [NSKeyedUnarchiver unarchiveObjectWithFile:@"glossary.archive"];

for ( NSString *key in glossary)
NSLog(@" %@: %@", key, [glossary objectForKey: key]);

    [pool drain];
    return 0;
}
Logged
Pages: [1] Go Up
Print
Jump to:



Login with username, password and session length

Powered by MySQL Powered by PHP Powered by SMF 1.1.11 | SMF © 2006-2009, Simple Machines LLC Valid XHTML 1.0! Valid CSS!
Entire forum contents (c) 2009 classroomM.com. All rights reserved.