What is wrong here?
What is wrong here?
- Subject: What is wrong here?
- From: "Peter Karlsson" <email@hidden>
- Date: Wed, 18 Jun 2003 08:36:07 +0000
Dear list!
I am trying to use different data sources with on NSTableView.
Look at this code snippet:
records6 = [[NSMutableArray alloc] initWithObjects: @"Cocoa", @"Is",
@"Good", nil];
records7 = [[NSMutableArray alloc] initWithObjects: @"Cocoa", @"Is",
@"Great", nil];
myBigArray = [[NSMutableArray alloc] initWithObjects:records6, records7,
nil];
- (int)numberOfRowsInTableView:(NSTableView *)aTableView
{
return [[myBigArray objectAtIndex:index] count];
}
- (id)tableView:(NSTableView *)aTableView
objectValueForTableColumn:(NSTableColumn *)aTableColumn row:(int)rowIndex
{
id theRecord, theValue;
theRecord = [[myBigArray objectAtIndex:index] objectAtIndex:rowIndex];
theValue = [theRecord objectForKey:[aTableColumn identifier]];
return theValue;
}
It works as long as my index is 0, but if the index is 1 I get a error
message saying:
*** -[NSConstantString objectForKey:]: selector not recognized
What can be wrong here?
Peter
_________________________________________________________________
Add photos to your e-mail with MSN 8. Get 2 months FREE*.
http://join.msn.com/?page=features/featuredemail
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.