Hybrid View

  1. #1
    Sencha User
    Join Date
    Jun 2009
    Posts
    3
    Vote Rating
    0
    zxcvbgfdsa8 is on a distinguished road

      0  

    Default Unanswered: Extjs 4.0.7: Sencha SDK minified app still loading individual JS files.

    Unanswered: Extjs 4.0.7: Sencha SDK minified app still loading individual JS files.


    Hey, I'm trying to deploy my application in a minified manner and I am following these instructions:
    http://docs.sencha.com/ext-js/4-0/#!...rted-section-3

    All the produced files look good. all-classes.js and app-all.js look like they contain my JS files and looked to be minified in the app-all.js. However, when I try to include just my app-all.js the webpage tries to dynamically load my other JS files. So even though my ExampleStore.js is in/defined by my app-all.js the webpage tries to load my ...sencha_bundled/app/store/ExampleStore.js?_dc=1354044172696

    Am I missing some configuration option or is my understanding of what the Sencha SDK tool is suppose to do incorrect? Here is my index.html:
    PHP Code:
    <html>
    <
    head>
        <
    title>Hello Ext</title>

        <
    link rel="stylesheet" type="text/css" href="extjs/resources/css/ext-all.css">
        <
    script type="text/javascript" src="extjs/ext.js"></script>
        <script type="text/javascript" src="app-all.js"></script>
    </head>
    <body></body>
    </html> 
    When I load this page Firebug clearly show in the console a get request requesting my various models, stores, and views.

    Thanks for your help!

    James

  2. #2
    Sencha - Support Team scottmartin's Avatar
    Join Date
    Jul 2010
    Location
    Houston, Tx
    Posts
    8,624
    Answers
    612
    Vote Rating
    398
    scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future

      0  

    Default


    all-classes.js and app-all.js look like they contain my JS files and looked to be minified in the app-all.js
    If app-all.js has all you code and ext, there is no need for extjs/ext.js to be included.

    Scott.

  3. #3
    Sencha User
    Join Date
    Jun 2009
    Posts
    3
    Vote Rating
    0
    zxcvbgfdsa8 is on a distinguished road

      0  

    Default


    Quote Originally Posted by scottmartin View Post
    If app-all.js has all you code and ext, there is no need for extjs/ext.js to be included.

    Scott.
    I've adjusted my code. Here is what it looks like now:
    PHP Code:
    <html
      <
    head>     
        <
    title>Hello Ext</title>
        <
    link rel="stylesheet" type="text/css" href="extjs/resources/css/ext-all.css">
        <
    script type="text/javascript" src="app-all.js"></script>
      </head> 
      <body></body>
     </html> 
    Now Firebug and the Chrome JS Console is telling me:
    PHP Code:
    ReferenceErrorExt is not defined 
    Here is what I did to bundle/build my code just in case I did something wrong there:
    PHP Code:
    sencha create jsb -a http://location_to_app/index.html -p app.jsb3
    sencha build -p app.jsb3 -
    I used Sencha Architect to build my application. At first 'sencha create' would create a .jsb3 file that had no files to include. I then downloaded and placed ExtJS 4.0.7 into my application directory and changed my code to point to the 'local' ext files instead of the cachefly version. This seemed to build the .jsb3 files corrrectly.

    James

  4. #4
    Sencha User
    Join Date
    Dec 2012
    Posts
    3
    Vote Rating
    0
    sgr is on a distinguished road

      0  

    Default


    I have the same issue. If I include the minified app-all.js file, then the browser complains 'Ext is not defined'. Then I replaced app-all.js with not-minified all-classes.js to look at the source code. It turned out that all-classes.js starts with

    Ext.define('Ext.util.Observable', {

    /* Begin Definitions */

    requires: ['Ext.util.Event'],

    statics: {
    /**
    * Removes **all** added captures from the Observable.
    *
    * @param {Ext.util.Observable} o The Observable to release
    * @static
    */
    releaseCapture: function(o) {
    o.fireEvent = this.prototype.fireEvent;
    },

    /**
    * Starts capture on the specified Observable. All events will be passed to the supplied function with the event
    * name + standard signature of the event **before** the event is fired. If the supplied function returns false,
    * the event will not fire.
    *
    * @param {Ext.util.Observable} o The Observable to capture events from.
    * @param {Function} fn The function to call when an event is fired.
    * @param {Object} scope (optional) The scope (`this` reference) in which the function is executed. Defaults to
    * the Observable firing the event.
    * @static
    */
    capture: function(o, fn, scope) {
    o.fireEvent = Ext.Function.createInterceptor(o.fireEvent, fn, scope);
    },


    You can see that all-classes.js which is supposed to include all ExtJS dependencies together with my application dependencies, doesn't include Ext.define function.

  5. #5
    Sencha User
    Join Date
    Aug 2011
    Posts
    32
    Vote Rating
    1
    igoberman is on a distinguished road

      0  

    Default


    Can someone from Sencha support reply to this question? I have spent a several frustrating hours trying to get my application production ready. I have all my and ExtJS classes in app-all.js. Where is the documentation on how to get this basic and very important task to work?
    Thanks

  6. #6
    Sencha - Support Team scottmartin's Avatar
    Join Date
    Jul 2010
    Location
    Houston, Tx
    Posts
    8,624
    Answers
    612
    Vote Rating
    398
    scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future

      0  

    Default


    If your app is still making calls to other files .. check the following:
    -Make sure you have all your files included
    -Make you included all the 'requires' needed in each module
    -Make sure you are loading (compressing) your files in the correct order

    Run your application in uncompressed mode and use ext-dev.js and see if there are any warnings in the console that need to be corrected.

    Scott.

film izle

hd film izle

film sitesi

takipci kazanma sitesi

takipci kazanma sitesi

güzel olan herşey

takipci alma sitesi

komik eğlenceli videolar