1. #1
    Sencha User
    Join Date
    Apr 2014
    Posts
    12
    Vote Rating
    3
    MBS Patrick is on a distinguished road

      0  

    Default Compiled ExtJs application throws 'TypeError: Ext.util is undefined' at startup

    I've been working on an extjs application for a few weeks now and I'm finally starting to get to a point where I want publish my application. Using Sencha Cmd I've compiled my application into an index.html / all-classes.js without minification. I have a build.bat file the my extjs application root along side with my app.js, in ./app/ are the remaining files of my applications and in ./ext-4.0/ are my ext-js 4.2.1 files.

    However, whenever I open the compiled application page in Firefox it throws the following error:
    TypeError: Ext.util is undefined

    Ext.util.DelayedTask = function(fn, scope, args, cancelOnDelay) {


    Whenever I click through I jumps into the all-classes.js to the location where Ext.util.DelayedTask is defined in source in the all-classes.js.

    This is head-section my index.html:
    Code:
            
            <!-- <x-compile> -->
                <!-- <x-bootstrap> -->
                    <script type="text/javascript" src="ext-4.0/locale/ext-lang-nl.js"></script>
                    <script type="text/javascript" src="ext-4.0/ext-all.js"></script>
                <!-- </x-bootstrap> -->
    
                <script type="text/javascript" src="mzPivotGrid-all.js"></script>
                <script type="text/javascript" src="app.js"></script>
            <!-- </x-compile> -->
    And this is how I compile my application using a build.bat located in the same folder as app.js:
    sencha compile -classpath=ext-4.0/src,. page -in=index.html -out=build/index.html

    What an I doing wrong?

  2. #2
    Sencha - Support Team
    Join Date
    Feb 2013
    Location
    California
    Posts
    8,501
    Vote Rating
    227
    Gary Schlosberg has much to be proud of Gary Schlosberg has much to be proud of Gary Schlosberg has much to be proud of Gary Schlosberg has much to be proud of Gary Schlosberg has much to be proud of Gary Schlosberg has much to be proud of Gary Schlosberg has much to be proud of Gary Schlosberg has much to be proud of Gary Schlosberg has much to be proud of

      0  

    Default

    Not sure this is the issue, but your locale file should be loaded after the main framework loads.
    http://docs.sencha.com/extjs/4.2.1/#...e/localization

    Should be this way:
    Code:
    <script type="text/javascript" src="ext-4.0/ext-all.js"></script>
    <script type="text/javascript" src="ext-4.0/locale/ext-lang-nl.js"></script>


    Join me at SenchaCon 2016!

Thread Participants: 1