The suckiness of it all just hit home.
It was all going really well, until I noticed this interesting discrepency: In Mozilla events fire with a scope chain starting at the object which fired the event, then the window containing that object. In Internet Explorer 6, events fire in the scope their event handler was defined in. Given that I'm used to how CODE refs work in Perl, I was expecting the latter behavior, and it was all going well until I got to cross-browsering my clicky-choose-hue box.
What's more, Mozilla doesn't seem keen on letting my window talk to
window.opener, so I can't fake IE's behavior by making explicit calls into the parent window's scope. I'm just wondering if any of those folks who said they do this kind of thing for a living want to give me a hint on how to get around this one…
Might as well throw in a screenshot, too.
The lightness gradient is off by one pixel because of the bug I reported a few minutes ago regarding colour transformations on the full 256-colour palette.
Update @ 2:05GMT: It's fixed, and it wasn't nearly as painful as I was expecting:
// Copy some functions into the picker's scope so events can hit them p._HSVtoRGB = _HSVtoRGB; p._varstoform = _varstoform; p.setBGColor = setBGColor;
It's an ugly solution, but it works and doesn't involve duplicating anything apart from three references, which I assume are pretty small. I'm back on track now.