I want to create a class which has the same properties as Object, with
some of my own whistles.

Not instantiate the object, just declare it.

The instantiation comes later in other code.

So, I suppose, how do I inherit Object into my class?



On 22/02/07, Christophe Porteneuve <[EMAIL PROTECTED]> wrote:
>
> Hey Richard,
>
> Richard Quadling a �crit :
> > But this doesn't give me a .inspect() method and there is no
> > Object.create() method.
>
> Of course.  Why would it?  If you look at Prototype's source, you'll see
> that any object having an inspect method implements it (Array, String,
> Hash, and the like).  This is because nobody can guess for you what
> inspect() should do for your specific class.
>
> There is also no such thing as Object.create.  Anywhere.  Except for
> Class.create.  Creating a new object is done using the "new" operator,
> as in:
>
>         var fpn = new class_FaxPageNumber();
>
> > NOTE: I only want to define the class to inherit the Object methods.
>
> Prototype classes don't inherit a thing.  They only provide a initialize
> convention for the constructor, and Object.extend spares you having to
> manually deal with the native JS syntax, which is slightly more outlandish.
>
> --
> Christophe Porteneuve aka TDD
> [EMAIL PROTECTED]
>
> >
>


-- 
-----
Richard Quadling
Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498&r=213474731
"Standing on the shoulders of some very clever giants!"

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Prototype: Core" group.
To post to this group, send email to prototype-core@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/prototype-core?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to