Re: How to NSTableView and NSArrayConroller
Re: How to NSTableView and NSArrayConroller
- Subject: Re: How to NSTableView and NSArrayConroller
- From: Craig Laird <email@hidden>
- Date: Tue, 2 Jan 2007 01:11:42 +1100
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 ??
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 (email@hidden)
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:
This email sent to email@hidden