site_archiver@lists.apple.com Delivered-To: cocoa-dev@lists.apple.com Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=nXsudIl9F++v+O5eWy6b9L2CIjvlyUHbDC7wQa8nK+GbIwcDkN/CCwsh0WTp7E41cIYsivhVAOnLKRNbEmC+pWFHumVOaiTGG/pIpxsAw9aJTwrNiWSXo9Ksu6iEwCFpEBn8pS1t5UxcGtiF+AviM/3WbYEAzlzRVL4ymIw3ERQ= #import "MyController.h" #import "Contact.h" @implementation MyController - (void)awakeFromNib { In Cocoa, unless you're working with threads or creating your own framework you should rarely be managing your own autorelease pool. ABAddressBook *book = [ABAddressBook sharedAddressBook]; contact = [[NSMutableArray alloc] initWithArray:[book people]]; This isn't a very good key-value programming practice. How are observers supposed to know that you changed the "contact" key? This line should really be something more like: [self setContact:[book people]] NSEnumerator * myArrayEnumerator = [contact objectEnumerator]; NSString *thisObject; while (thisObject = [myArrayEnumerator nextObject]) { name = [thisObject valueForProperty:kABFirstNameProperty]; This isn't a good test because it's not how NSArrayController pulls information out of the object. NSArrayController calls something like: [thisObject valueForKey:@"name"] Where @"name" is whatever key you've bound your table column too. I'm not familiar with the address book framework, but I'm guessing that it doesn't implement key-value coding for the properties you want. You might have to wrap the information in your own NSDictionary. _______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/site_archiver%40lists.apple... 2007/1/1, Craig Laird <craig@essentialfootwear.com>: NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; NSLog(@"First Name Is %@", name); This email sent to site_archiver@lists.apple.com