1. #1
    Sencha Premium Member
    Join Date
    Mar 2012
    Posts
    76
    Vote Rating
    0
    stoertebeker is on a distinguished road

      0  

    Default Failed loading Application.js

    Failed loading Application.js


    Hi,
    I hope I learned my lesson and will follow the guidelines for reporting a bug.

    Cmd Version: 3.1.0.239
    OS: MacOS X 10.8.2
    Framework: 4.1.1a

    Description:
    I have build an app that runs w/o problems in a browser (Chrome). After compiling the app and creating the all-classes.js and a new index.html the app shows the following error messages in Chrome:
    Code:
    
    
    I checked and the problem is that the correct path would be ...ext/tt032013/ext/src/app/Application.js.

    Not sure why all-classes.js points to a wrong folder?

    And the main question is why does Chrome load .js files? I thought that now everything is included in all-classes.js?


    Thanks.

  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    36,649
    Vote Rating
    817
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      0  

    Default


    After the build it is still trying to load Ext.app.Application? This is incorrect, all the classes should be built into one file so soemthing is not requiring Ext.app.Application correctly.
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!

    When posting code, please use BBCode's CODE tags.

  3. #3
    Sencha Premium Member
    Join Date
    Mar 2012
    Posts
    76
    Vote Rating
    0
    stoertebeker is on a distinguished road

      0  

    Default


    Maybe I wasn't clear enough. I am just doing the compile step.
    Code:
    sencha compile -classpath=app.ext/src pahe -yui -in ./index-in.html -out ./index.html
    Now I was expecting that the new index.html would work with the all-classes.js that was created.

  4. #4
    Ext JS Premium Member Steffen Hiller's Avatar
    Join Date
    Mar 2008
    Posts
    770
    Vote Rating
    28
    Steffen Hiller will become famous soon enough Steffen Hiller will become famous soon enough

      0  

    Default


    I'm having the same issue, same Cmd Version, same Mac OS X version and same Framework version.

    The debug output of compile/build actually says at one point:
    Code:
    [DBG] Adding file /my/path/sdk/src/app/Application.js

  5. #5
    Sencha - Ext JS Dev Team dongryphon's Avatar
    Join Date
    Jul 2009
    Posts
    1,295
    Vote Rating
    122
    dongryphon is a name known to all dongryphon is a name known to all dongryphon is a name known to all dongryphon is a name known to all dongryphon is a name known to all dongryphon is a name known to all

      0  

    Default


    Debugging via the forum is a fun art form... Need more tea leaves to read on this one.

    Can you copy/paste the exact command you ran from the console/terminal and the full log using "-debug" in a CODE block?

    Just looking at the one you posted:

    Code:
    sencha compile -classpath=app.ext/src pahe -yui -in ./index-in.html -out ./index.html
    The classpath looks wrong. It should probably have a comma not a dot between "app" and "ext/src" but that could just be a typo if you typed it here vs copy/pasted it here.
    Don Griffin
    Ext JS Development Team Lead

    Check the docs. Learn how to (properly) report a framework issue and a Sencha Cmd issue

    "Use the source, Luke!"

  6. #6
    Sencha User
    Join Date
    Dec 2010
    Posts
    56
    Vote Rating
    -1
    squalo is an unknown quantity at this point

      0  

    Default Application.js ?

    Application.js ?


    I'm struggling now for many hours with sencha cmd to get a compiled version of my MVC app running.
    And I think, I got almost the same problem as described here before:

    First:
    Sencha Cmd Version: 3.1.2.3342
    Browser: Chrome
    ExtJS: 4.1.1a

    This is what chrome tells me:
    Code:
    [/COLOR]
    [/COLOR]
    This is all the Sencha Cmd Output:
    Code:
    R:\webapp\DAVCOM_D>sencha compile --debug -classpath=..\..\ext-4.1.1a\src,..\..\
    ext-4.1.1a\examples\ux\grid,app page -yui -in app.html -out build/app.html
    Sencha Cmd v3.1.2.342
    [INF] Compiling page null
    [INF] Loading classpath entry R:\ext-4.1.1a\src
    [INF] Loading classpath entry R:\ext-4.1.1a\examples\ux\grid
    [INF] Loading classpath entry R:\webapp\DAVCOM_D\app
    [WRN] C1000: Rhino Parse Warning (Trailing comma is not legal in an ECMA-262 obj
    ect initializer =>                         ]) -- R:\ext-4.1.1a\examples\ux\grid\
    filter\DateFilter.js:13383
    [INF] Loading classpath entry R:\webapp\DAVCOM_D\sencha-compile-temp-dir\e3f8d5c3-1f73-49dc-8e6-7df4f10467df
    [INF] Compressing data with YuiJavascriptCompressor
    [INF] Concatenating output to file R:\webapp\DAVCOM_D\build\all-classes.js

    and this is the app.js main file of the project
    PHP Code:
    Ext.Loader.setConfig({ 
        
    enabledtrue,
        
    paths: {
      
    'Ext.ux.grid''../../ext-4.1.1a/examples/ux/grid'
        
    }
    });


    Ext.application({
        
    requires: [ 'Ext.container.Viewport',
        
    'Ext.layout.container.Table',
        
    'Ext.layout.container.Border',
        
    'Ext.tip.QuickTipManager'],
        
    name'DAVCOM_D',
      
    appFolder'app',
        
    controllers: [
      
    'Releases'
        
    ],
      
    launch: function() {
      
    Ext.tip.QuickTipManager.init();
      
    Ext.create('Ext.container.Viewport', {
       
    layout: {
        
    type'table',
    ... 
    an this is my app.html (index.html startpage)
    HTML Code:
    <html>
        <head>
    
      <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
      <link rel="stylesheet" type="text/css" href="../../ext-4.1.1a/resources/css/ext-all-gray.css" />
      <link rel="stylesheet" type="text/css" href="../css/releases.css" />
      <!-- <x-compile> -->
      <!-- <x-bootstrap> -->
      <script type="text/javascript" src="../../ext-4.1.1a/ext-dev.js"></script>
      <!-- </x-bootstrap> -->
      <script type="text/javascript" src="app.js"></script>
      <!-- </x-compile> -->
        </head>
        <body></body>
    </html>
    Running the plain app in the browser works fine.

    What is wrong with compiling?
    Appreciating any hints.
    BR

    Btw: Application.js ?? Is ext-4.1.1a\src\app\Application.js meant here?