Even before I upgraded to OS X 10.4 (Tiger), I got the report that the Save File dialog in Realpolitik crashes. Now I have applied a quick’n’dirty fix for the next couple of days for all Tiger users and released Realpolitik 1.7.0 Alpha 2 earlier than planned.
Currently I’m revamping the dialogs known to Mac developers as Navigation Services. Already done in Alpha 2 is the Open File dialog:
From the users perspective you have now a working type pop-up, where you can choose Realpolitik Files (.dpy files and files created by Realpolitik), Text Files or just any document.
The old dialog (from Alpha 1, see below) had a a type pop-up too, but it was not working. Though both dialogs look identical except for the type pop-up, there are major technical differences. The old dialog used the deprecated NavGetFile() function, the new dialog relies on the recommended
The most difficult part was to find out how to use NavCreateGetFileDialog(). For a simple type pop-up it is enough to fill a type list with the four character type codes. If you want more control (use file extensions, specify the text shown in the pop-up, etc.), you need to write custom event and filter callbacks. There are no examples how to do this in Apples online documentation (!), only the downloadable Carbon SDK contains a sample application using a custom type pop-up. But this NavSample has its own problems: it still uses the old WaitNextEvent programming model and had to be adapted for the Carbon Events model used by Realpolitik.