Use Array:invoke: http://jsfiddle.net/aySpB/3/
On Mon, Feb 21, 2011 at 12:59 AM, deefr <[email protected]> wrote: > I am following > https://github.com/mootools/mootools-core/wiki/Upgrade-from-1.2-to-1.3 > to in an effort to remove the compatibility layer from my 1.3 build. > I'm having trouble upgrading the following sample code (please open > the Javascript console before running): > > http://jsfiddle.net/deefour/aySpB/2/ > > I expect 'a' and 'b' to be printed in the console output. The > Try.implement(... line is where the problem is, resulting in the > following error: > > Uncaught TypeError: Object [object Object] has no method 'oneEvent' > > The upgrade wiki has > > Native => Type (see Core.js) > > The code at the top of the jsfiddle.net paste above is from > > > http://appden.com/javascript/fun-with-custom-events-on-elements-in-mootools/ > > Can someone tell me what I'm missing to get the code in my above > example to run without error? >
