cyohman

[AGSAddressCandidate decodeWithJSON:]: unrecognized selector sent to class

Discussion created by cyohman on Jun 15, 2010
NSString *locationJSON = @"{\"x\":-122.408951,\"y\":37.783206,\"spatialReference\":{\"wkid\":4326}}";
 NSDictionary *attributesJSON=[NSDictionary dictionaryWithObjectsAndKeys:@"MASON", @"StreetName", @"ST", @"StreetType", nil];
 NSDictionary *json=[NSDictionary dictionaryWithObjectsAndKeys:@"1 MASON ST", @"address", [locationJSON JSONValue], @"location", @"75", @"score", attributesJSON, @"attributes", nil];
 AGSAddressCandidate *candidate =[AGSAddressCandidate decodeWithJSON:json]; //[[AGSAddressCandidate alloc ]initWithJSON:json]; 


yields:


2010-06-15 15:17:50.229 AGSAddressCandidate[1244:207] *** +[AGSAddressCandidate decodeWithJSON:]: unrecognized selector sent to class 0x6855c
2010-06-15 15:17:50.232 AGSAddressCandidate[1244:207] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** +[AGSAddressCandidate decodeWithJSON:]: unrecognized selector sent to class 0x6855c'
2010-06-15 15:17:50.233 AGSAddressCandidate[1244:207] Stack: (
    31298651,
    2473596169,
    31680763,
    31250038,
    31102658,
    12663,
    3999554,
    10189,
    3483083,
    3520950,
    3509044,
    3491455,
    3518561,
    39394649,
    31083392,
    31079496,
    3485205,
    3522479,
    10104,
    9958
)


Why?

Outcomes