ugh, my mac is not networked (on a PC now) so posting the code is not possible, but here is some more info.
VectorFormatter basically takes and makes Vectors with i, j, k variables that have the form "<i j k>". OrientationFormatter extends VectorFormatter and should format planes and lineations (which extend vector) differently.
Code:
-(NSString *)stringForObject:(id)object {
NSLog(@"class %@", [object class]);
if([object isKindOfClass:[AKLineation class]]) {
retirn [object description]; // if lineation
} else {
NSLog(@"defaulting on %@",[object description]);
return [super stringForObjectValue:object];
}
return [NSString stringWithFormat:@"error"];
}
when i start the program i have 10 instances of vector, plane and orientation added to the mutable array and the output always says
Code:
class Vector
defaulting on <3 4 5>
class Vector
defaulting on <1 2 9>
...
i have the array bound to an array controller with default class Lineation and when i add a new one, it uses the vector notation, not the required format.
i have -(NSString *)description over-ridden in each class and i call each one in the init, and the display is fine, only when it is being displayed in the tableview does it default to vector notation.