14 Aug 2010 lloydwood   » (Journeyer)

Tcl/Tk on Mac OS X still broken

I've previously written about Mac OS X Tcl/Tk menu problems, which prevented SaVi from using the Mac menubar on 10.5 Leopard. That was fixed only by upgrading to 10.6 Snow Leopard. (Okay, downgrading to 10.4 Tiger also works, if your hardware supports it - but who wants to do that?)

I've just added accelerator key (menu shortcut) support in a SaVi development update. This is not straightforward - the Tk commands and binding are a bit arcane, not easy to get right, and you have to do things like bind both the upper- and lowercase keypresses - and it's even less straightforward if you're crossplatform, as I am.

Imagine my joy on discovering that pressing a newly-implemented menu shortcut on the Mac - and only on the Mac - froze the application. (This is on 10.6. Remember that in 10.5, you can't even use the menubar, and have to use my workaround popup menus, where accelerators work.) So now there's a workaround to turn off menu shortcuts on the Mac, except when you're using the workaround for 10.5, where the menu shortcuts work, but the menubar itself doesn't. Clear?

As usual, Tcl/Tk on other platforms Just Doesn't Have These Problems. I think Mac Tcl/Tk's problems are due to being over a decade less mature and stable than on other platforms (Tcl/Tk on the original Mac OS never went very far, as far as I know), with perhaps Apple selecting versions of Mac Tcl/Tk to ship in OS releases without communicating with Mac Tcl developers about what might be best to ship also being a factor.

I bought a MacBook in 2007. I ported my application to it, but couldn't get a Mac menubar. I worked around that and a bunch of other Mac-specific problems, and bought Snow Leopard in 2009. Now I have a menubar, but not with menu shortcuts.

Do I want to be a Mac developer? Well, have you seen what happens when I put the work in to try to get a reasonable Mac interface for my crossplatform application? It's just not worth it.

Latest blog entries     Older blog entries

New Advogato Features

New HTML Parser: The long-awaited libxml2 based HTML parser code is live. It needs further work but already handles most markup better than the original parser.

Keep up with the latest Advogato features by reading the Advogato status blog.

If you're a C programmer with some spare time, take a look at the mod_virgule project page and help us with one of the tasks on the ToDo list!