May, 2006

Blog

Don’t forget addEvent!

After reading Dustin’s post about forgetting addEvent, I have to disagree.
Not with the part about using Yahoo’s new Event Utility (that part I DO agree with), the part I disagree with is dropping of the addEvent function.

You see, most folks already have some form of addEvent, with all of the standard params, so why force them to go through their code, and replace addEvent with "YAHOO.util.Event.addListener"?

The easier solution is to take your current addEvent function, and make it a wrapper for the new Yahoo event utility, like so:


function addEvent(el, sType, fn,

Weird Dreamweaver bug

Do you have Dreamweaver 8 (might happen in MX or MX2004 as well)? Open up a CSS file (make sure all your other files are saved).

Make a few rules in the file. Now right before the closing } on one of your rules, add an apostrophe ( ‘ ), and hit save.

If your setup is anything like mine, you should see Dreamweaver disappear, and you cant get it open again. Nice, Macromedia. Real nice.

Anyways, to get it to where you CAN open DW again, open that CSS file and remove the offending apostrophe.

I have no idea…