December 23, 2003

Link: Mac OSX hacks

Daniel Steinberg's preso is a good read.
I got trapped by one of these Mac java integration tricks last friday when using the excellent SQuirrel SQL client: I succeeded into adding the Mysql driver, creating an alias to my db, and connecting to it, but when I quit the application, the configuration data was not serialized to the config file.
This puzzled me for a while, but I wanted to be able to use that app on a regular basis, to manage my roller database (inside my company's firewall, for my personal weblog I use MT), so I followed the geeky way and found a brute force solution for my problem: the application has an option to serialize itself to XML. I did my configurations again, then serialized the whole app to an XML file, and then just copied the relevant sections of the app XML to the config file, to have the right JDBC driver and alias entires (this is yet one more very cool benefit of using XML for configuration serialization :-).
Everyhting worked fine and I felt better. Then I noticed that the File menu had an exit option: I had used the cmd-Q shortcut to quit the app, which triggers the Mac specific Application Menu, with about and quit. The SQuirrel SQL team may not have customized their ApplicationAdapter to call the code that is called on File/Exit.
Using File/Exit serialized the config changes to the config file fine.
The world we live in is so baroque :-)

Posted by chanezon at December 23, 2003 02:44 PM | TrackBack
Comments
Post a comment









Remember personal info?