On Tue, 2005-09-06 at 13:56, Scott F. Walter wrote:> FYI--I have been trying for the past 3 hours trying to get some of the
> widgets from the Dojo javascript library to work with my Rails app. I
> have been struggling to get things to work and it came down to the fact
> that there are some incompatibilites between Dojo and Prototype. As
> soon as I removed the reference to prototype everything worked magically.
>
> Some of the widgets in Dojo are pretty cool like the dropdown menu as
> well as the dialog box.
>
> If you have used both in a page with success I would like to hear about it.
I ran into a similar problem with a different (internal) javascript
library. I wound up doing a binary search:
* Try it with all of prototype commented out
* Try it with the second half of prototype commented out
* Try it with 1/4 (or 3/4) or prototype commented out
* etc.
Eventually, you''ll come to one tiny bit of protocol.js that breaks your
library (assuming there''s only one). Given that information and the
way
in which your code breaks, it will probably be obvious why, but if not
you can always try to repeat the trick going the other way (removing
code from your library).
In my case, the internal library was counting on some quirky IE
behaviour that was "normalized" by prototype. We considered running
with a modified prototype.js, but realized it would be easier (and
cleaner) to just remove the quirk dependence.
Once you resign yourself to it, it shouldn''t take more than an hour.
But before that, have you done the obvious--look for errors in the
javascript console?
--MarkusQ