1. #1
    Sencha User
    Join Date
    May 2012
    Posts
    61
    Vote Rating
    2
    cahello is on a distinguished road

      0  

    Default EXT is not defined error!!

    EXT is not defined error!!


    Hello All,

    I get this error "Uncaught ReferenceError: Ext is not defined" followed by some indication towards .js files. I have a portlet's view.jsp which calls the main.js by "Ext.onReady(function(){ sample3();})". The main.js has links to two other .js files, namely panels.js and panels2.js. The code for one of the .js files is as follows:

    Ext.application({
    launch: function() {
    Ext.define('trial', {
    extend:'Ext.panel.Panel' ,
    id:'trial',
    items :[{
    xtype : 'button',
    text: 'Submit'
    } ],
    height: 200,
    width: 400
    })
    }
    });

    The code for the other one is similar. On trying to display, it gives the error "EXT is not defined". I cant seem to find out the reason even after a lot of searching. Any suggestions?

    Thanks in advance!

  2. #2
    Sencha - Support Team scottmartin's Avatar
    Join Date
    Jul 2010
    Location
    Houston, Tx
    Posts
    8,910
    Vote Rating
    443
    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


    Do you included ExtJS in your HTML file?

    ex:
    Code:
        <link rel="stylesheet" type="text/css" href="extjs4/resources/css/ext-all.css"/>
        <script type="text/javascript" src="extjs4/ext-all-debug.js"></script>
    Regards,
    Scott.

  3. #3
    Sencha User
    Join Date
    May 2012
    Posts
    61
    Vote Rating
    2
    cahello is on a distinguished road

      0  

    Default


    Yep. I have included both the files. I have also included ext-all.js.

  4. #4
    Sencha - Support Team scottmartin's Avatar
    Join Date
    Jul 2010
    Location
    Houston, Tx
    Posts
    8,910
    Vote Rating
    443
    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


    Are there any errors in the console when trying to load? cannot find ext-all.js error?
    If you feel the path is right, are you using any dynamic loaders?

    Scott.

  5. #5
    Sencha User
    Join Date
    May 2012
    Posts
    61
    Vote Rating
    2
    cahello is on a distinguished road

      0  

    Default


    The path is correct because there was no error initially. Only after I added the line "console.log("Blah");", I started getting the issue. Each time I restart the server, I get a different error. Now, I am getting this error:
    "Uncaught TypeError: Cannot read property 'dom' of null" for "ext-all-debug.js".

  6. #6
    Sencha - Support Team scottmartin's Avatar
    Join Date
    Jul 2010
    Location
    Houston, Tx
    Posts
    8,910
    Vote Rating
    443
    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


    That is a rendering issue .. does this run?

    Code:
    Ext.application({
        launch: function() {
            Ext.define('trial', { // define panel
                extend: 'Ext.panel.Panel',
                items: [{
                    xtype: 'button',
                    text: 'Submit'}],
                height: 200,
                width: 400
            });
            
            Ext.create('trial', { // create panel
                renderTo: Ext.getBody()
            });    
        }
    });​
    Scott.

  7. #7
    Sencha User
    Join Date
    May 2012
    Posts
    61
    Vote Rating
    2
    cahello is on a distinguished road

      0  

    Default


    I ran it once using the modified code. It runs perfectly now without any error. Although no error exists, could you please explain why this "ext is not defined" error occurs? I have come across the same error many times before and after some random code modification, it worked. Is there any specific cause other than the path issue?

    Thanks!

Thread Participants: 1

Tags for this Thread

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..."