You can't use myObject.clone() because MooTools does not alter the Object prototype. See: http://erik.eae.net/archives/2005/06/06/22.13.54/
On Wed, May 25, 2011 at 2:39 AM, Arian Stolwijk <[email protected]> wrote: > Array.clone is documented > (http://mootools.net/docs/core/Types/Array#Array:Array-clone), but > that's actually the generic version of the clone method on Array > ([].clone). > > We probably need to fix the docs. > > > On Wed, May 25, 2011 at 11:32 AM, woomla <[email protected]> wrote: > > Hi, > > > > Using mootools 1.3.1, there is an Array clone function (implemented, > > you can use myarray.clone()), but it is not documented. Should I use > > Array.clone(myarray) instead? > > > > When I have an object, I must use Object.clone(myobject). Why can't I > > use myobject.clone()? > > > > It seems so much more logical to have the clone member function for > > both Object and Array. Now the clone method from Array calls cloneOf > > which has to look up the type before cloning the property. We end up > > with using this function ourselves (it is not public in MooTools), or > > we have to exactly now the type of the property we want to clone > > (basically a must but alah..). > > > > W. > > > > > > > > >
