View Full Version : Simple (but deadly!) copy/paste bug in Actor.js

1 Nov 2006, 12:45 AM
Actor.js, Line 200:

YAHOO.ext.Actor.prototype.setOpacity = YAHOO.ext.Actor.overrideAnimation(YAHOO.ext.Actor.superclass.setHeight, 1, 3);

Should probably be more like this...

YAHOO.ext.Actor.prototype.setOpacity = YAHOO.ext.Actor.overrideAnimation(YAHOO.ext.Actor.superclass.setOpacity, 1, 3);

The JSDoc comment above that line is incorrect as well.

I went ahead and checked the rest of the overrides in that area for errors, and this was the only issue I found.

I'm happy to report that I discovered this BEFORE I ran the code that uses it, and thus didn't waste any time tracking down the problem. I hope nobody has been burned by this, because it could be painful (imagine trying to add some spice with a fade effect, and watching your layout go all wonky instead... :oops: )

1 Nov 2006, 2:07 AM
Wow, very nice find. I have to tell you, I DID have a problem with it a few months ago and gave up on it. Because of how those methods are asynchronous and go through a million tween calls in YAHOO.util.Anim it's impossible to debug.