PDA

View Full Version : Can you have comments in the JSB2 file?



mark.lancaster
30 Dec 2010, 3:38 AM
I'm trying to build a cut down version of the Ext All library by commenting out unwanted components in a copy of the ext.jsb2 file.

I've tried to comment out lines using // and /* */, but this results in errors when you attempt to build:


Missing value at character 26375
Failed to open project file.
java.lang.NullPointerException
at com.extjs.JSBuilder2.createTempHeaderFile(JSBuilder2.java:141)
at com.extjs.JSBuilder2.main(JSBuilder2.java:38)
Failed to create temporary header file.
....more snipped...

Can lines be commented out, or do they have to be removed?

Mark

Condor
30 Dec 2010, 3:46 AM
Are you sure? That error looks more like you only commented out a part of a section.

mark.lancaster
30 Dec 2010, 4:10 AM
Hi Condor

Thanks for replying.

I'm commenting out a single line in the pkgDeps section, for example:

{
"name": "Ext All No Core",
"file": "ext-all-no-core.js",
"isDebug": true,
"includeDeps": true,
"pkgDeps": [
"pkgs/ext-foundation.js",
"pkgs/cmp-foundation.js",
"pkgs/ext-dd.js",
"pkgs/data-foundation.js",
"pkgs/data-json.js",
"pkgs/data-xml.js",
"pkgs/data-grouping.js",
"pkgs/direct.js",
"pkgs/resizable.js",
"pkgs/window.js",
"pkgs/state.js",
"pkgs/data-list-views.js",
"pkgs/pkg-tabs.js",
"pkgs/pkg-buttons.js",
"pkgs/pkg-toolbars.js",
"pkgs/pkg-history.js",
"pkgs/pkg-tips.js",
"pkgs/pkg-tree.js",
"pkgs/pkg-charts.js",
"pkgs/pkg-menu.js",
"pkgs/pkg-forms.js",
"pkgs/pkg-grid-foundation.js",
"pkgs/pkg-grid-editor.js",
/*"pkgs/pkg-grid-property.js",*/
"pkgs/pkg-grid-grouping.js"
],
"fileIncludes": []
}

Condor
30 Dec 2010, 4:13 AM
OK, then it looks like you're correct.

The .jsb3 format will probably support remarks, because it uses javascript to parse the file.

mark.lancaster
30 Dec 2010, 4:23 AM
Thanks for the info.

As a work-around I found you can use an invalid path to achieve the same result, i.e.

replace "pkgs/pkg-grid-property.js", with "ZZZpkgs/pkg-grid-property.js",

Doing this successfully builds the library.

Mark