I've seen issues similar to what I ran into posted elsewhere in this group,
however, not the same solution I came up with.
Recently I have been pushing very hard to convert my company's site from
using a multitude of outdated libraries (Prototype, Rico, YUI) to using just
jQuery.  Interestingly, I ran into a compatibility issue between jQuery
(specifically a plugin I wrote for our site) and Rico 1.1.2.  The offending
code turned out to be the Object.extend protoype (Object.prototype.extend).
I'm not entirely certain why my plugin decided it was best to use the Rico
version of extend instead of the jQuery  version, but at any rate, I found a
solution.

Step 1:
   Scripts should go on the page in the following order:
   jQuery
   Stuff extending jQuery
   Protoype (This version of Rico extends Protoype)
   Rico

Step 2:
   Modify Rico.js.  Look for the following if else block:

if (Object.prototype.extend) {
   Rico.ArrayExtensions[ Rico.ArrayExtensions.length ] =
Object.prototype.extend;
}else{
  Object.prototype.extend = function(object) {
    return Object.extend.apply(this, [this, object]);
  }

   Then add the following else if condition:

}else if(window.jQuery && jQuery.extend){
   Rico.ArrayExtensions[ Rico.ArrayExtensions.length ] = jQuery.extend;

These steps combined force Rico to use the jQuery version of extend, which
is apparently working just fine.  I beleive this issue arose because the
very first thing my plugin does is extend the default settings with an
options object robustly.  The Object.prototype.extend method, as depicted
above, can't really handle bool true as it's first argument and fails out.

I thought this was worth a share, and hopefully this helps someone who's
converting a site from very old libraries to something manageable.

-Drew

Reply via email to