Hello list,
I am not sure if this is the correct list, but I think this touches on xcode tools as much as it does on Cocoa.
Because I would like to maintain 10.2 compatibility for my binary, my PPC code is compiled with gcc 3.3. Now I compile the following with gcc 3.3 and the 10.2.8 SDK (on PPC):
myArray = [NSArray arrayWithObjects:[NSDictionary dictionaryWithObject:@"foo" forKey:@"bar"], [NSDictionary dictionaryWithObject:@"faz" forKey:@"bar"], nil];
result = [myArray valueForKey:@"bar"];
NSLog ([result description]);
When I run this code on a 10.4 system, the result is an uncaught exception that myArray "is not key value coding-compliant for the key bar"
But here it gets interesting: If I change the compiler to gcc 4 (leaving the SDK at 10.2.8), the code works as expected.
I originally thought I could be lazy and keep this code in the main binary, checking for 10.3 (or later) at run time (1). It seems I will have to create a loadble bundle for this, but would anybody know why it works with gcc 4, and not 3?
Alex
1) the feature would simply not be available for 10.2 users |