Wrapup of that last miserable day at work (Updated)
Just after the last update the internet router went dead, which just kind of fit into the general mood of how things were going.
Well the linker did "wing" it so I could link and build the packages. Next day on site installing the release I got hit by the problem, that some of our plists are not what the new NSPropertyListSerialization likes. Instead of giving just a warning and crunching through, Apple's programmer opted to raise an exception there. Not reading those plists would've meant a no show - not good!. So I needed to write a plist parser at the customers site to read them in and use NSPropertyListSerialization to write them out "properly" again. Then I found out that writing OpenStep files is not supported by Foundation... only just not quite as fast as I would like as I wrote something like this:
dictionary = [NSDictionary dictionaryWithObject:@"Value"
forKey:@"Key"];
error = nil;
data = [NSPropertyListSerialization dataFromPropertyList:dictionary
format:NSPropertyListOpenStepFormat
errorDescription:&error];
NSLog( @"what gives? %@ %@", data, error);
which yields what gives? (nil) (nil) and some head scratching. You actually need to write
dictionary = [NSDictionary dictionaryWithObject:@"Value"
forKey:@"Key"];
error = @"xxx";
data = [NSPropertyListSerialization dataFromPropertyList:dictionary
format:NSPropertyListOpenStepFormat
errorDescription:&error];
NSLog( @"what gives? %@ %@", data, error);
to get what gives? (null) Property list format kCFPropertyListOpenStepFormat not supported for writing.Curse Apple again! I wrote the plist out in XML format, which for demo purposes was OK, but might bite me later because there are still some Mac OS X Server 1.2 machines there.
Continue reading "Wrapup of that last miserable day at work (Updated)" »




