Data Source {key value coding-compliant} problem...
Data Source {key value coding-compliant} problem...
- Subject: Data Source {key value coding-compliant} problem...
- From: "Frederick C. Lee" <email@hidden>
- Date: Sat, 29 May 2004 10:56:07 -0700
I'm trying to create a NSMutableArray of cities & routing codes by
loading a simple data model called 'cityTest' that essentially has only
NSString instance variables. I load the cityTest object into an array
(cityData) to be the DataSource of a Table View (NSTableView).
...
cityData = [NSMutableArray array];
int theCount = [cityKeys count];
for(index = 0; index < theCount; index++) {
cityTest *myCity = [[cityTest alloc] init];
[myCity setCityName: [cityKeys objectAtIndex:index]];
[myCity setRoutingCode: [cityMArray objectAtIndex:index]];
[cityData addObject:myCity];
[myCity release];
}
...
@interface cityTest : NSObject {
NSString *cityName, *routingCode;
NSAttributedString *aMemo;
}
What I always get is the following:
2004-05-29 10:44:40.143 docCountries[3265] [<cityTest 0x371a80>
valueForUndefinedKey:]: this class is not key value coding-compliant
for the key City.
*** malloc[3265]: Deallocation of a pointer not malloced: 0xbfffd190;
This could be a double free(), or free() called with the middle of an
allocated block; Try setting environment variable MallocHelp to see
tools to help debug
-----
I read that NSObject is key-value coding compliant and hence, my
cityTest model object is ALSO compliant. Yet I get the error message;
even when I load the data with just simple one-column NSStrings {i.e.,
cityData = [cityKeys copy]}, I get the SAME error.
1) Does anyone know of a remedy?
Sigh...the examples in the books were quite strait-forward.
Thanks in advance!
Ric.
_______________________________________________
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.