View Full Version : JSBuilder - Javascript Error

4 Dec 2006, 8:56 PM
I have downloaded the latest version of JSBuilder (1.1). I tried building a single js file (target.js) using all of the js files listed in the source directory of the yui-ext.0.33-rc3 build. When I include the target.js file in my web page, I get an error from Firefox saying YAHOO.ext has no properties on line 10 of the file. Here is the code from line 10:

YAHOO.ext.grid.AbstractColumnModel=function(){this.onWidthChange=new YAHOO.util.CustomEvent('widthChanged');this.onHeaderChange=new YAHOO.util.CustomEvent('headerChanged');this.onHiddenChange=new YAHOO.util.CustomEvent('hiddenChanged');this.events={'widthchange':this.onWidthChange,'headerchange':this.onHeaderChange,'hiddenchange':this.onHiddenChange};};YAHOO.ext.grid.AbstractColumnModel.prototype={fireEvent:YAHOO.ext.util.Observable.prototype.fireEvent,on:YAHOO.ext.util.Observable.prototype.on,addListener:YAHOO.ext.util.Observable.prototype.addListener,delayedListener:YAHOO.ext.util.Observable.prototype.delayedListener,removeListener:YAHOO.ext.util.Observable.prototype.removeListener,purgeListeners:YAHOO.ext.util.Observable.prototype.purgeListeners,fireWidthChange:function(colIndex,newWidth){this.onWidthChange.fireDirect(this,colIndex,newWidth);},fireHeaderChange:function(colIndex,newHeader){this.onHeaderChange.fireDirect(this,colIndex,newHeader);},fireHiddenChange:function(colIndex,hidden){this.onHiddenChange.fireDirect(this,colIndex,hidden);},getColumnCount:function(){return 0;},isSortable:function(col){return false;},isHidden:function(col){return false;},getSortType:function(col){return YAHOO.ext.grid.DefaultColumnModel.sortTypes.none;},getRenderer:function(col){return YAHOO.ext.grid.DefaultColumnModel.defaultRenderer;},getColumnWidth:function(col){return 0;},getTotalWidth:function(){return 0;},getColumnHeader:function(col){return'';}};

I read some of the other postings about the dependencies in the build process. Since I'm selecting everything in the source directory shouldn't the build work?

4 Dec 2006, 10:11 PM
The build order is important. Make sure that when you created your build target, the order of files in the righthand pane of the "Output Target Properties" window is correct per the order you would use if including them one-by-one in the page. JSB simply spits them out into one file in the order they are listed.

If this doesn't fix your issue, open your .jsb file in a text editor and copy the "target" node (shown below) and paste it here and we'll go from there (remember to check "disable html"):

<target name="New Target" file="$output\target.js" debug="False" shorthand="False" shorthand-list="[clipped]">
<include name="your\file1.js" />
<include name="your\file2.js" />

8 Dec 2006, 10:40 PM
Just a little housekeeping... I assume that this is the same problem that you reported in your other post here: http://www.yui-ext.com/forum/viewtopic.php?t=1296

It should be resolved now as of my last post in that thread, but if you have any further issues, please follow up in that thread.