Hi Arieh, Thanks a lot for the smart solution ;) You are really a cracker :) And also I would like to thank everybody for your participate. Cheers Ramy
On Mar 11, 11:50 am, אריה גלזר <[email protected]> wrote: > a small fix:http://jsfiddle.net/ariehg/ZDzPh/2/ > the overloader will now use the first function (or if overloaded after > construction the original method) if no match was found. > > > > > > > > > > On Fri, Mar 11, 2011 at 12:48 PM, אריה גלזר <[email protected]> wrote: > > As promissed: > >http://jsfiddle.net/ariehg/ZDzPh/ > > > a note on usage - since Class wraps it's methods, it is impossible to know > > function's arguments length after construction. To avoid this limitation, > > simply override the methods on a literal object before passing it to the > > Class constructor (as shown in the demo). This is actually a useful way of > > writing classes as it allows editor like eclipse to outline your methods. > > > On Thu, Mar 10, 2011 at 8:30 PM, אריה גלזר <[email protected]> wrote: > > >> Porting Resig's idea won't be very hard. It would require some monkey > >> patching though. I might be able to upload something like it in a few hours > > >> On Thu, Mar 10, 2011 at 3:29 PM, remram <[email protected]> wrote: > > >>> Hi Slik, > >>> That is exactly, what I have looked for. But It's no Mootools. I found > >>> also a solution from John Resig > >>>http://ejohn.org/blog/javascript-method-overloading/ > >>> . But is still no Mootools ;) I thought with Mootools would be > >>> possible. Thank you anyway ;) > > >> -- > >> Arieh Glazer > >> אריה גלזר > >> 052-5348-561 > >>http://www.arieh.co.il > >>http://www.link-wd.co.il > > > -- > > Arieh Glazer > > אריה גלזר > > 052-5348-561 > >http://www.arieh.co.il > >http://www.link-wd.co.il > > -- > Arieh Glazer > אריה גלזר > 052-5348-561http://www.arieh.co.ilhttp://www.link-wd.co.il
