PDA

View Full Version : ext and yiu not playing nice.



TopKatz
5 Apr 2007, 5:58 AM
In our project we curently are using both ext and yui. As time goes on we will faze out the yui stuff for ext. However right now Im getting errors with my ext menu/toolbar stuff that is on th esame page as a form built with yui components. The page loads fine, however when I click a menu button, and hover over the items I get this error:

li.getRegion().adjust is not a function
http://localhost/www/html/intercity/ext/scripts/ext-all.js
Line 155

This is the load order of the js and css from the page.

<link rel="stylesheet" type="text/css" href="css/ihsStyle.css" />
<link rel="stylesheet" type="text/css" href="ext/css/ext-all.css" />
<link rel="stylesheet" type="text/css" href="ext/css/ytheme-gray.css" />


<script type="text/javascript" src="ext/scripts/yui-utilities.js"></script>
<script type="text/javascript" src="ext/scripts/ext-yui-adapter.js"></script>
<script type="text/javascript" src="ext/scripts/ext-all.js"></script>


<link rel="stylesheet" type="text/css" href="yui/css/calendar.css" />
<link rel="stylesheet" type="text/css" href="yui/css/container.css" />
<script type="text/javascript" src="yui/scripts/yahoo-min.js"></script>
<script type="text/javascript" src="yui/scripts/calendar-min.js"></script>
<script type="text/javascript" src="yui/scripts/dom-min.js"></script>
<script type="text/javascript" src="yui/scripts/event-min.js"></script>
<script type="text/javascript" src="yui/scripts/container-min.js"></script>
<script type="text/javascript" src="yui/scripts/dragdrop-min.js"></script>
<script type="text/javascript" src="yui/scripts/connection-min.js"></script>

I get the error on another form that uses the same set of yui components. Not sure what is causing it, or if there is a workaround?

Katz

tryanDLS
5 Apr 2007, 6:46 AM
It's possible there are some clashes between your includes. You're including yui files after the Ext versions of the yui stuff. I would try removing all the yui js files except for calendar.js and container.js. If you're doing any dragdrop on yui components, you might need to add dragdrop.js too, but otherwise has it's own DragDrop implementation.

heidtmare
5 Apr 2007, 8:34 AM
i was under the impression that the yui utilities file was a master file containing all yui crap... i didn't think u needed to include all the other stuff.

TopKatz
5 Apr 2007, 8:57 AM
That did the trick. Thank you!

heidtmare
5 Apr 2007, 9:18 AM
glad to hear it.