Where was that click?

I have used many kinds of UI toolkits over the years. To greater and lesser extents I have used Macintosh (pre-Cocoa), Win32, Motif, Qt, Swing, Xlib, wxWindows, Tk, Andrew, and some others that I don't remember their names. Today, I needed a little dynamic HTML widget to hold an image and respond to clicks. Piece of cake! Hum, but where is the API call to get the location of the mouse relative to the image? As far as I can tell there is none. Perhaps the new CANVAS element is kinder to developers but to do this without it requires many more lines of code than I would have expected. Luckily, Re:morse.nl in conjunction with prototype already figured it out and, better still, figured it out right.

No comments: