On 28 Apr., 19:33, Torli Birnbauer <[email protected]> wrote: > Валерий, what did you expect to get. The output is dictionary style > set of key/value pairs. There is no mistake here, or am I missing > something? > > On Tue, 2009-04-28 at 17:07 +0400, Мелешкин Валерий wrote: > > To my surprise, just after execution of app "opts.out.plist" looks like > > this: > > > { > > Name = "John Doe"; > > Phones = ( > > "408-974-0000", > > "503-333-5555" > > ); > > } > > > Where a mistake is? > > > _______________________________________________ > > Discuss-gnustep mailing list > > [email protected] > >http://lists.gnu.org/mailman/listinfo/discuss-gnustep
AFAIK, [dict writeToFile: @"./opts.out.plist" atomically: YES]; writes always in NSPropertyListOpenStepFormat while dictionaryWithContentsOfFile: tries all formats it knows. So you have written a plist format converter. To force writing of XML, use: NSPropertyListSerialization to convert the NSDictionary into XML and then, writeToFile: the NSData result. => [[NSProperyListSerialization dataFromPropertyList:dict format:NSPropertyListXMLFormat_v1_0 errorDescription:&err] writeToFile: @"./opts.out.plist" atomically: YES]; -- hns _______________________________________________ Discuss-gnustep mailing list [email protected] http://lists.gnu.org/mailman/listinfo/discuss-gnustep
