1. #1
    Sencha User
    Join Date
    Dec 2012
    Location
    Madagascar
    Posts
    5
    Vote Rating
    0
    joga bonito is on a distinguished road

      0  

    Default AppFolder specification in all-classes.js [ExtJs 4.1.1a, Sencha cmd 3.0.0.250]

    AppFolder specification in all-classes.js [ExtJs 4.1.1a, Sencha cmd 3.0.0.250]


    Hi all,

    In order to reduce file loading, I've compiled my app and I've followed this process:

    1) Generate the bootstrap.js by this sencha cmd command:
    Code:
    C:\wamp\www\aris\interface\app>sencha compile -classpath=../app meta -alias -out ../build/bootstrap.js and meta -alt -append -out ../build/bootstrap.js and meta -loader -append -out ../build/bootstrap.js
    2) Specify <x-compile> and <-bootstrap> tag like this:
    HTML Code:
    <html>
    <head>
      <title>Test</title>
      <meta http-equiv="content-type" content="text/html; charset=UTF-8" />
      <link rel="stylesheet" type="text/css" href="extjs/resources/css/ext-all.css">
      <link rel="stylesheet" type="text/css" href="resources/css/grid.css">
    
      <!-- <x-compile> -->
        <!-- <x-bootstrap> -->
          <script type="text/javascript" src="extjs/ext-all.js"></script>
          <script type="text/javascript" src="build/bootstrap.js"></script>
        <!-- </x-bootstrap> -->
    
        <script type="text/javascript" src="app.js"></script>
      <!-- </x-compile> -->
    </head>
    <body></body>
    </html>
    3) Compilation through this command:

    Code:
    InMyAppFolder>sencha compile -classpath=../extjs/src,../app page -in=../index.php -out=../build/index.php
    I've pasted the all-classes.js and the index.php file from the build folder to the root folder. The problem is when I run the application, thre are many 404 error like this:
    • [COLOR=red !important]Uncaught Error: [Ext.Loader] Failed loading 'proxy/ajax.js', please verify that the file exists all-classes.js:10092[/COLOR]

    • [COLOR=red !important]Uncaught Error: [Ext.Loader] Failed loading 'AM/model/myFile.js', please verify that the file exists ....[/COLOR]
    It didn't find another files but I've just took these as example.

    AM is appName in app.js!Note that I've already specify the appFolder as app and put something like this in the all-classes.js
    Code:
    Ext.Loader.setPath ('AM', 'app');
    . I think that it doesn't know how to map AM with app folder. I don't see another issues!Your help is welcome!

    Thanks in advance.

  2. #2
    Sencha User
    Join Date
    Dec 2012
    Location
    Madagascar
    Posts
    5
    Vote Rating
    0
    joga bonito is on a distinguished road

      0  

    Default


    No one?

  3. #3
    Sencha - Ext JS Dev Team dongryphon's Avatar
    Join Date
    Jul 2009
    Posts
    1,355
    Vote Rating
    134
    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


    You did not mention if you are in a Cmd-generated app or not. If you are then try "sencha app build" instead as it contains a lot more than just the JS compile step.

    If you are not in a Cmd-generated app and if you code does not fully specify it "requires" then it will probably help to tell the compiler which framework you are using (to enable its auto-dependency checks which are framework-specific). That switch should also automatically add the "src" folder to the classpath.

    Code:
    sencha -sdk=../extjs compile -classpath=../app page -in=../index.php -out=../build/index.php
    Not sure I am following all the ".." references you had in your original command - I am assuming you are running from one-level down from your app's root folder?
    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!"

  4. #4
    Sencha - Ext JS Dev Team dongryphon's Avatar
    Join Date
    Jul 2009
    Posts
    1,355
    Vote Rating
    134
    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


    Also, there is an updated version available with some bug fixes - http://www.sencha.com/forum/showthre...-Now-Available
    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!"

  5. #5
    Sencha User
    Join Date
    Dec 2012
    Location
    Madagascar
    Posts
    5
    Vote Rating
    0
    joga bonito is on a distinguished road

      0  

    Default


    Thanks for your reply!
    That's right! I've run this command from my app folder:
    - app
    - extjs
    - build (where generated files are stored =>all-classes.js, index.html)
    - index.html


    You think that it didn't recognize my extjs sdk? ... So I'll try your solution and keep you informed!

Thread Participants: 1