Re: How to NSTableView and NSArrayConroller
site_archiver@lists.apple.com Delivered-To: cocoa-dev@lists.apple.com Cheers Craig #import "MyController.h" #import "Contact.h" @implementation MyController - (void)awakeFromNib { NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; ABAddressBook *book = [ABAddressBook sharedAddressBook]; contact = [[NSMutableArray alloc] initWithArray:[book people]]; NSEnumerator * myArrayEnumerator = [contact objectEnumerator]; NSString *thisObject; while (thisObject = [myArrayEnumerator nextObject]) { name = [thisObject valueForProperty:kABFirstNameProperty]; NSLog(@"First Name Is %@", name); } [pool release]; return 0; } - (void) dealloc { [contact release]; [super dealloc]; } @end _______________________________________________ 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... Thanks Scott That was a big help I still have not been able to get my array to show in my tableView as yet this is what I have tried with my MyController.m class I am getting the first name showing in the log with NSLog(@"First Name Is %@", name); I am only getting <null> in the TableView What am I missing ?? This email sent to site_archiver@lists.apple.com
participants (1)
-
Craig Laird