View Full Version : YAHOO.extend() versus YAHOO.extendX()

2 Feb 2007, 8:11 AM
Can someone explain the difference betweek YAHOO.extend() and YAHOO.extendX()? The method signatures are basically identical.

If this has already been discussed, please excuse my post. I searched the forums and didn't find what I was looking for, so here goes.

2 Feb 2007, 8:35 AM
Looking at the code, extendX calls extend, but handles the overrides itself, without passing them to extend. It also adds a method called 'override' to the subclass, which allows you to do subclass.override(...), rather than YAHOO.override(subclass,...).

There may be more to it it than that, but this is just based on my quick compare of the source.

2 Feb 2007, 3:55 PM
I created extendX when YAHOO.extend accepted 2 arguments to allow the inline overrides. They added the feature in a recent release.

extendX also added a function for inline function overrides.