Extending Object.prototype is considered extremely bad form:

    
http://blog.metawrap.com/blog/June6thIsJavaScriptArrayAndObjectprototypeAwarenessDay.aspx

Yes, it breaks a number of libraries (including jQuery) because it
make the for(key in object) more complicated to use.

Karl Rudd

On Thu, Sep 25, 2008 at 2:21 AM, smurkas <[EMAIL PROTECTED]> wrote:
>
> Hello again. I've been writing a script today and wanted a quick way
> to figure out the size of arrays that are initialized like var
> barValues = {"Lab 1":10, "Lab 2":20, "Lab 3":30} (which seem to be
> considered as objects) so I wrote a Object.prototype.size that did
> this for me. However when this was done and I hooked up jquery UI +
> jquery draggable I get the error "proto.plugins[i].push is not a
> function" on line 18 of ui.core.js. The code still runs though but I'm
> not using any UI plugins on the page so that might be why.
>
> Are there known conflicts to prototyping on different things when
> using jquery or should prototyping be avoided? Some clarity from one
> of the pros would be greatly appreciated!
>
>
> Kindly, Marcus.
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"jQuery UI" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/jquery-ui?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to