Hash is not a class, it's a Native.
You can implement a new function into hash with Hash.implement (just like
you'd do String.implement), but you can't extend it.

If you wan to create a class with hash methods, check out Hash.Cookie for an
example of a class that uses all of Hash's methods.

-aaron

On Mon, Dec 29, 2008 at 4:56 PM, Brandon-2 (via Nabble) <
[email protected]<ml-user%[email protected]>
> wrote:

>
> Hi everyone,
>
> I wanted to extend Hash so I can write a caching mechanism, but I got
> an error when I tried to create an instance of my class:
>
>         arguments.callee.caller.__parent is undefined
>
>
> My code is the following:
>
>         var Cache = new Class({
>
>             Extends : Hash,
>
>             initialize : function() {
>                 this.parent();
>             }
>
>         });
>
>         var cacheInstance = new Cache();
>
>
> What am I doing wrong?
>
> Thanks,
> Brandon
>
>
> ------------------------------
>  View message @
> http://n2.nabble.com/Can%27t-Extend-Hash--tp2090892p2090892.html
> To start a new topic under MooTools Users, email
> [email protected]<ml-node%[email protected]>
> To unsubscribe from MooTools Users, click here< (link removed) >.
>
>
>


-----
The MooTools Tutorial:  http://www.mootorial.com www.mootorial.com 
Clientcide:  http://www.clientcide.com www.clientcide.com 
-- 
View this message in context: 
http://n2.nabble.com/Can%27t-Extend-Hash--tp2090892p2090923.html
Sent from the MooTools Users mailing list archive at Nabble.com.

Reply via email to