-
11 Dec 2012 9:01 AM #1
Minified code has errors in Code - whereas unminified code works perfectly
Minified code has errors in Code - whereas unminified code works perfectly
Actually the post contains 2 questions
1) The following code snippets when part of the files that are minified using Sencha Cmd's
Sencha app Build - produces errors
Code:{ xtype : 'fieldcontainer', combineErrors : true, msgTarget : 'qtip', fieldLabel : 'Campaign Type', allowBlank : false, defaults : { hideLabel : true, width : 330 }, items : [{ xtype : 'radiogroup', id : 'campaignTypeRadioGroup', name : 'campaignType', columns : 2, vertical : true, fieldLabel : 'Campaign Type', layout : 'hbox', items : [{ checked : true, boxLabel : 'Ad-Hoc ', name : 'campaignType', inputValue : 'N' }, { boxLabel : 'Re-curring', inputValue : 'Y', name : 'campaignType' }] }] },Code:{ xtype : 'fieldcontainer', combineErrors : true, msgTarget : 'qtip', fieldLabel : 'Campaign Type', allowBlank : false, defaults : { hideLabel : true, width : 330 }, items : [ { xtype : 'radiogroup', id : 'requestcampaignTypeRadioGroup', name : 'campaignTypeInd', vertical : true, layout : 'hbox', items : [{ boxLabel : 'Ad-hoc', inputValue : 'N', checked : true, name : 'campaignTypeInd' }, { boxLabel : 'Re-curring', inputValue : 'Y', name : 'campaignTypeInd' }] }] }-----------------------Code:{ xtype : 'radiogroup', width : 500, id : 'campaignTypeRadioGroupAS', fieldLabel : 'Campaign Type', labelSeparator : '', labelWidth : 130, labelAlign : 'left', vertical : true, margin : '5 5 3 5', items : [ { boxLabel : 'Ad-Hoc', inputValue : 'N', name : 'campaignType' }, { boxLabel : 'Re-curring', inputValue : 'Y', name : 'campaignType' }, { boxLabel : 'Both', name : 'campaignType', checked : true, ///Need to repalce this with the correct input value inputValue : 'B' } ] }
2) Even after removing the above snippets rendering of the viewport fails with the following message
Issue appears after the Viewport's initComponent has been CompletedCode:TypeError: 'null' is not an object (evaluating 'u.dom')
The arguments passed on the anonymous method called by doInsert isCode:callee is "doInsert" in the class "Ext.dom.Helper" Called by "append" in the Ext.dom.AbstractHelper called by "render" in the Ext.util.Renderable called by the "constructor" in the Ext.AbstractComponent called by the "callParent" in the "Ext.Base" called by the "constructor" in the Ext.Component
Any help would be appreciatedCode:0: null 1: Object - cls: "x-panel x-panel-default" id: "ext-comp-1012" style: Object tag: "div" tpl: Object $name: "doRenderBody" $owner: function j() {return this.constructor.apply(this,arguments)||null;} $childEls: Array[1] $className: "Ext.layout.container.Container" $isClass: true 2: undefined 3: "beforeend" 4: "" 5: true
-
15 Dec 2012 8:17 AM #2
Similar problem with Leaflet Library
Similar problem with Leaflet Library
I had a similar problem with the minifying process. After creating a production build I always got errors with the Leaflet-Library which uses L as namespace.
After some research I found out that minifying the microloader (in index.html) was the problem. It also used L as variable name, which resulted in complications.
As a workaround I removed the line in Sencha Cmd where the microloader gets minified.
After this my production build worked without any problems.Code:/<Sencha Cmd Verzeichnis>/plugins/touch/current/app-build.js line 362 //content = compressor.compress(content);
I'm not sure if this helps resolving your problem.
Greetings
tschortsch
-
21 Dec 2012 5:49 AM #3
Was able to generate classes with uncompressed output but Contollers not found
Was able to generate classes with uncompressed output but Contollers not found
First tschortsch.
Thanx for your input
After long research found that the sencha and build command had issues with the application workspace generated and not the file structure.
Finally tried out the sencha single page build process using the compile
IssuesCode:sencha compile -classpath=ext-4.1/src,app page -in indexOriginal.jsp -out build/index.jsp
1) Layouts used for field containers were never added to concatenated all-classes.js code. Solution used was to add them explicitly using the Ext.require();
2) requires :[] references in the various components created problem in concatenated build as the application creation was done at a later stage. Solution - removed requires references from all models, stores & views.
3) controllers are now not added in the generated all-classes.js - Solution - Not yet found
-
21 Dec 2012 5:56 AM #4
First tschortsch. Thanx for your input After long research found that the sencha and
First tschortsch. Thanx for your input After long research found that the sencha and
Thank you tschortsch your input is valid for touch users. we found that only later. We were using EXTJS.
Like Malliga we also used
sencha compile -classpath=ext-4.1/src,app page -in index.jsp -out build/index.jsp
and found almost the same issues
Sencha Cmd not adding controllers in the concatenated ouput in unbelievable.
out index.jsp looked like this
Does Sencha Cmd produce any reliable build output with the controllers in it???Code:<!-- <x-compile> --> <!-- <x-bootstrap> --> <script type="text/javascript" src="ext-4.1/ext-all-debug.js"></script> <!-- </x-bootstrap> --> <script type="text/javascript" src="app/app.js"></script> <script type="text/javascript" src="app/all-classes.js"></script> <!-- </x-compile> -->
-
21 Dec 2012 6:24 AM #5
The metadata generated by the compile command
The metadata generated by the compile command
Tried to see if the metadata generator is able to locate the controllers in the application
Please find attached the meta-data.Code:sencha compile -classpath=ext-4.1/src,app page -i indexOriginal.jsp -out build/index.jsp and metadata -m -json -o Metadata.json
None of the controllers has been added in the meta-data.
is there a separate command or instruction to do the same.
Dont Controllers also get generated in the all-classes.js??? file
Any help would be greatly appreciated
-
21 Dec 2012 6:27 AM #6
Found out that the xtype was not determinable by EXTJS for Radio group's child components.
Explicitly added the widget.radio in the Ext.require('') and it started to work fine for the viewport rendering.
Thank you for reporting this bug. We will make it our priority to review this report.


Reply With Quote