-
25 May 2012 5:08 AM #11
I'm trying to follow your instruction and I've put ext-dev.js instead of ext-debug.js.
I get these errors:
$ sencha create jsb -a index-build.html -p app.jsb3 -v
[E] Failed loading 'src/app/Application.js', please verify that the file exists
[object Object]
Failed loading 'src/app/Application.js', please verify that the file exists
file:////media/Podaci/web/ks/lib/ext-4.0/ext-dev.js : 8712
file:////media/Podaci/web/ks/lib/ext-4.0/ext-dev.js : 8216
file:////media/Podaci/web/ks/lib/ext-4.0/ext-dev.js : 2454
file:////media/Podaci/web/ks/lib/ext-4.0/ext-dev.js : 7943
file:////media/Podaci/web/ks/lib/ext-4.0/ext-dev.js : 7892
This happens with original and with your phantom file so this is caused by ext-dev. Any idea why?
If I use ext-debug I don't see these errors.
-
25 May 2012 5:34 AM #12
Okay. This may have something to do with your Ext.Loader configuration. I would assume that if you open up that same index-build.html in your browser and view the console, you would get the same error, no?
I don't know if you're using Architect or not but your Ext.Loader config in app.js should look something like this:
Also, does your index-build.html include your app.js?Code:Ext.Loader.setConfig({ enabled: true, paths: { Ext: './lib/extjs/src', MyApp: './app } });
-
25 May 2012 9:13 AM #13
Dependencies not always loaded....
Dependencies not always loaded....
Originally Posted by Sottilde
I have noticed several things (using ext-debug.js):
When I load my app via browser and initial viewport loads, a number of dependencies are loaded.
But then, when I navigate to a different view (in my case a new tab in central tabpanel is opened that has a grid) a slew of other dependencies are being loaded on demand. But I think this goes to tell that if phantomJS is looking up Loader.history to figure out dependencies and you provide only initial view then it will not know about other ones (it cannot navigate to this other view magically).
The solutions are (as you indicated)
- to either provide all these dependencies in index-build.html
- use requires statements (ughhh...)
Neither, in my opinion is maintainable
Then I started thinking about what you said regarding including ext-all.js...
For a fairly complex app, why not just combine app's code with it and minify everything.
If you can say that app is using 75% of the framework and you decide to include ext-all.js, you would be making a trade-off between headeaches of dependency management and having few extra bytes being downloaded by clients (I have not checked, but I think extra 25% of framework your app is not using would not add a lot of overhead)
I am really considering this approach, but there is now another culprit....
How do I generate JSB3 file with a target that has only my apps files (and none of ext js ones)....
If I can do this in some automated fasion that would be great....
Can phantom js task that reads Ext.Loader.history generate 2 targets by filtering Ext dependencies and your Apps dependencies (I think it could becuase you have to give your app the namespace)
Saga continues...
-
25 May 2012 1:06 PM #14
-
25 May 2012 4:01 PM #15
Test
Test
hello
i would like to test the Ext JS.
thank“s a lot
Guy
-
26 May 2012 2:48 AM #16
Thanks, after I've set path to Ext it does not generate error.
-
26 May 2012 3:13 AM #17
Because I belong to this group which has dependencies loading after click I followed this advice with one of including ext-all.js in build target for app-all.js, and I got millions of errors like:
[ERROR] 18:1137:illegal character
[ERROR] 18:1137
yntax error
[ERROR] 18:1229:illegal character
[ERROR] 18:1229
yntax error
[ERROR] 18:1455:illegal character
[ERROR] 18:1455
yntax error
[ERROR] 18:1463:illegal character
[ERROR] 18:1464:illegal character
[ERROR] 18:1464
yntax error
[ERROR] 18:1518:illegal character
...
[ERROR] 147:8192:unterminated string literal
[ERROR] 148:2
yntax error
[ERROR] 148:175:missing } after property list
[ERROR] 148:335
yntax error
[ERROR] 148:417:invalid return
[ERROR] 148:463:missing ; before statement
[ERROR] 148:627:invalid return
[ERROR] 148:665:missing ; before statement
[ERROR] 693:0:missing } in compound statement
[ERROR] 693:0:missing } in compound statement
[ERROR] 1:0:Compilation produced 515 syntax errors.
org.mozilla.javascript.EvaluatorException: Compilation produced 515 syntax errors.
at com.yahoo.platform.yui.compressor.YUICompressor$1.runtimeError(YUICompressor.java:135)
at org.mozilla.javascript.Parser.parse(Parser.java:410)
at org.mozilla.javascript.Parser.parse(Parser.java:355)
at com.yahoo.platform.yui.compressor.JavaScriptCompressor.parse(JavaScriptCompressor.java:312)
at com.yahoo.platform.yui.compressor.JavaScriptCompressor.<init>(JavaScriptCompressor.java:533)
at com.yahoo.platform.yui.compressor.YUICompressor.main(YUICompressor.java:112)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:616)
at com.yahoo.platform.yui.compressor.Bootstrap.main(Bootstrap.java:20)
Loading the Project Name Project
Loaded 0 Packages
Loaded 2 Builds
Creating the "All Classes" target as "all-classes.js"
- 10 file(s) included in this target.
+ app/view/appmenu/Menu.js
+ app/view/invoice/List.js
+ app/view/report/Daily.js
+ app/model/Invoice.js
+ app/store/Invoices.js
+ app/model/Partner.js
+ app/controller/Menu.js
+ app/controller/DailyReport.js
+ app/store/Partners.js
+ app/controller/Invoice.js
* Parse all-classes.js with options:
- debug: true
- debugLevel: 1
Creating the "Application - Production" target as "app-all.js"
- 3 file(s) included in this target.
+ lib/ext-4.0/ext-all.js
+ build/all-classes.js
+ app.js
* Parse app-all.js with options:
- debug: false
- debugLevel: 1
* Compress and obfuscate app-all.js...
Copy resources...
Done building!
Any idea why?
-
26 May 2012 5:31 AM #18
Ah yes, I had forgotten, ext-all.js is compressed in a such a severe way that it causes compilation issues when you attempt to re-compress it.
The best way to go may be to compress your app files into a compressed all-classes.js, but to set compress to "false" when creating app-all.js. I am not certain this would be successful but I believe it would simply concatenate all-classes.js and ext-all.js to app-all.js, instead of trying to compress them in.
-
28 May 2012 12:31 AM #19
For now I exclude ext completely from app.jsb3 and add it as separate js resource in my html file.
-
7 Jun 2012 10:20 AM #20
Thank you for reporting this bug. We will make it our priority to review this report.


Reply With Quote