1. #1
    Sencha User
    Join Date
    Jan 2012
    Posts
    11
    Answers
    1
    Vote Rating
    0
    ssplawn is on a distinguished road

      0  

    Default Answered: Using the build tool I get: Uncaught ReferenceError: Ext is not defined

    Answered: Using the build tool I get: Uncaught ReferenceError: Ext is not defined


    Hi guys, I am currently trying to create a production build for my app.
    Doing my best to follow the steps in http://docs.sencha.com/touch/2-0/#!/guide/building
    (If i do follow it exactly, it breaks on the "sencha build" step because the app.js path in my generated app.jsb3 file is incorrect)
    First I go to the root directory of my app (where index.html is found) and run:

    Code:
    sencha create jsb -a http://localhost/touchcatalog/ -p app.jsb3
    Once the app.jsb3 file is created I have to edit the path entry for my app.js file:
    from:
    Code:
     {            "name": "Application - Production",
                "target": "app-all.js",
                "compress": true,
                "files": [
                    {
                        "path": "",
                        "name": "all-classes.js"
                    },
                    {
                        "path": "",
                        "name": "app.js"
                    }
                ]
            }
    to:
    Code:
     {            "name": "Application - Production",
                "target": "app-all.js",
                "compress": true,
                "files": [
                    {
                        "path": "",
                        "name": "all-classes.js"
                    },
                    {
                        "path": "app/",
                        "name": "app.js"
                    }
                ]
            }
    then I run:

    Code:
     sencha build -p app.jsb3 -d ./
    Here is my production index.html:
    Code:
    <!DOCTYPE html><html>
    <head>
        <title>Catalog</title>
        <link rel="stylesheet" href="resources/css/sencha-touch.css" type="text/css">
        <style>
            .productlistitem img{
                height: 60px;
            }
            .productpageitem img{
                height: 150px;
            }
            .productpagedetail img{
                height: 250px;
            }
            .animation_frame { width:100%; height:100%; }
            }
        </style>
        
        <script type="text/javascript" src="app-all.js"></script>
    </head>
    <body></body>
    </html>
    here is my app.js:

    Code:
    (function() {
    
      Ext.Loader.setConfig({
        enabled: true
      });
    
    
      Ext.Loader.setPath('Myapp', 'app');
    
    
      Ext.require(['Myapp.store.CategoriesStore', 'Ext.data.proxy.JsonP', 'Ext.TitleBar', 'Myapp.view.catalog.ProductPager', 'Myapp.store.ProductsStore', 'Myapp.Config', 'Myapp.view.ViewPort', 'Myapp.view.flyer.FlyerPager', 'Ext.field.Password', 'Myapp.store.VideoStore', 'Myapp.view.videos.VideoDetail', 'Ext.Video']);
    
    
      Ext.application({
        name: 'Myapp',
        controllers: ['Myapp.controller.MainController', 'Myapp.controller.catalog.MainCatalogController', 'Myapp.controller.catalog.ProductCatalogController'],
        models: ['CategoryModel', 'ProductModel'],
        stores: ['CategoriesStore', 'ProductsStore', 'Myapp.store.VideoStore'],
        views: ['ViewPort', 'Myapp.view.catalog.CategoryNestedList', 'Myapp.view.catalog.ProductView', 'Myapp.view.catalog.ProductViewToggle', 'Myapp.view.catalog.ProductList', 'Myapp.view.catalog.ProductPage', 'Myapp.view.catalog.ProductPanel', 'LoginForm', 'AuthenticationIndicator', 'Myapp.view.catalog.CatalogView', 'Myapp.view.flyer.FlyerPager', 'Myapp.view.videos.VideoDetail'],
        launch: function() {
          Ext.create('Myapp.view.ViewPort');
          return this.fireEvent('applaunch');
        }
      });
    
    
    }).call(this);
    When I hit it in my browser I get "Uncaught ReferenceError: Ext is not defined"
    Not sure how to get this working, any suggestions?

  2. You still need to reference sencha-touch.js

  3. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    36,795
    Answers
    3467
    Vote Rating
    834
    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


    You still need to reference sencha-touch.js
    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.

  4. #3
    Sencha User
    Join Date
    Jan 2012
    Posts
    11
    Answers
    1
    Vote Rating
    0
    ssplawn is on a distinguished road

      0  

    Default


    oh yeah... im using beta3 ,version 2 of the sdk tools, and sencha-touch-debug.js inside my development index.html file

  5. #4
    Sencha User
    Join Date
    Jan 2012
    Posts
    11
    Answers
    1
    Vote Rating
    0
    ssplawn is on a distinguished road

      0  

    Default


    With sencha-touch.js included, I get this error:
    Uncaught Error: Ext.Loader is not enabled, so dependencies cannot be resolved dynamically.

  6. #5
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    36,795
    Answers
    3467
    Vote Rating
    834
    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


    That means not all your files made it into the build.
    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.

  7. #6
    Sencha User
    Join Date
    Jan 2012
    Posts
    11
    Answers
    1
    Vote Rating
    0
    ssplawn is on a distinguished road

      0  

    Default


    ahh! that makes sense. thx, i will go through my jsb3 file and try to figure it out.
    Any idea why the sencha create command would have missed something? Is there something I can do on my end to ensure that it doesn't?
    (Im going to start by re-organizing my dependencies.... try to move them out of app.js and get my "requires" in the files where they actually need to go)

  8. #7
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    36,795
    Answers
    3467
    Vote Rating
    834
    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


    You have to be very careful that you put all your classes in the requires or views or controllers config arrays. If you want to know what classes aren't being included you can use sencha-touch-debug.js which has Loader enabled and you can watch the network tab to see what classes are still being loaded and also use the app-all.js file not your app.js.
    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.

Thread Participants: 1

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..." hd porno faketaxi