Oh, you meant polymorphism. Try to use this
http://code.google.com/p/polymorph-js/

On Thu, Mar 10, 2011 at 1:01 PM, remram <[email protected]> wrote:
> Hi everybody,
> I searched the web for a solution for my problem but I'm still
> unsuccessful. What I would like to do, is to do overloading my methods
> in my class (in my case draw). I have no idea if it is possible to do
> that with MooTools (version 1.2.4).
> Please have a look at my code below.
> Thank you in advanced for any hint or help.
>
> var Star = new Class({
>
>    draw: function(){
>        return 'borderd star!';
>    },
>
>    draw: function(extra){
>        return 'filled star' + extra;
>    }
> });

Reply via email to