pauladaniel / calendardateselect

Automatically exported from code.google.com/p/calendardateselect
Other
0 stars 0 forks source link

Element.addMethods conflicts #61

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
I'm using this in one of my js files:

    //extending the Element Class
    Element.addMethods({  
      appendText: function(element, text) {
        element = $(element);
        text = String.interpret(text);
        element.appendChild(document.createTextNode(text));
        return element;
      }
    });

This seems to break calendar_date_select.js which also extends the
prototype Element class.

Once I hover over and element (day in calendar) I get too much recursion
errors on line #9.

Not sure why this happens. Any idea?

Original issue reported on code.google.com by eggie5 on 20 Nov 2007 at 1:45

GoogleCodeExporter commented 8 years ago
I've found a workaround by arbitrarily renaming Element.build.

See my attached patch.

Original comment by eggie5 on 20 Nov 2007 at 2:59

Attachments:

GoogleCodeExporter commented 8 years ago
That's very strange... I wonder why that's conflicting?  What does 
Element#build do
after you've renamed it?

Great find by the way, thanks!

Original comment by timchar...@gmail.com on 20 Nov 2007 at 9:57

Attachments:

GoogleCodeExporter commented 8 years ago
Hey,

Everything works find after I change it.

Alex

Original comment by eggie5 on 24 Nov 2007 at 10:06

GoogleCodeExporter commented 8 years ago
Yes, what does Element#build do when it's not overwritten by calendar date 
select? 
What other libary defines it, making it a candidate for conflict?

Original comment by timchar...@gmail.com on 24 Nov 2007 at 10:19

GoogleCodeExporter commented 8 years ago

Original comment by timchar...@gmail.com on 11 Dec 2007 at 7:45