1. #1
    Sencha User cyberwombat's Avatar
    Join Date
    Oct 2011
    Posts
    237
    Answers
    6
    Vote Rating
    2
    cyberwombat is on a distinguished road

      0  

    Default Unanswered: Help on bullding

    Unanswered: Help on bullding


    Struggling a bit with building the app. Here's what I did - I first started using sencha-touch-debug - then realized there is a fundamental difference in how it handles object configs - so rewrote my app to use sencha-touch-all-debug (is this a bug btw? these are not interchangeable - in first one you access properties using object.property and the other requires using object.config.property)

    So now things work and I want to create a custom build. I generated my all-classes file according to docs and added to my index.html
    Code:
    <!DOCTYPE html>
    <!--<html manifest="cache.manifest">-->
    <head>
    
    
       
        <link rel="stylesheet" href="touch/resources/css/sencha-touch.css" type="text/css">
        <link rel="stylesheet" href="resources/css/app.css" type="text/css">
        <script type="text/javascript" src="touch/sencha-touch.js"></script>
        <script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=true"></script>
        <script type="text/javascript" src="config.js"></script>
        <script type="text/javascript" src="all-classes.js"></script>
        <script type="text/javascript" src="app.js"></script>
    
    
    </head>
    <body></body>
    </html>
    My app.js:

    Code:
    
    Ext.Loader.setConfig({
        enabled: true,
        paths: {
            'MyApp': 'app',
            'Ext': 'touch/src',
        }
    });
    
    
    Ext.require([
    'MyApp.lib.Util',
    'MyApp.lib.FormManager',
    'Ext.Map',
    'Ext.tab.Bar',
    'Ext.field.Password',
    'Ext.field.Email',
    'Ext.field.Select',
    'Ext.field.Hidden',
    'Ext.field.Slider',
    'Ext.Img',
    'Ext.ActionSheet',
    'Ext.form.FieldSet',
    'Ext.util.GeoLocation',
    'Ext.util.Observable'
    ]);
    
    
    Ext.application({
        name: 'MyApp',
        controllers: [...],
        views: [...],
        models: [...],
        stores: [...],
    
    
        launch: function() {
          ...
        }
    });
    I am stuck on the loader. Even though the docs say that sencha-touch.js has loaded enabled I get these errors:
    Code:
    sencha-touch.js:15Uncaught Error: Ext.Loader is not enabled, so dependencies cannot be resolved dynamically. Missing required class: Ext.util.Observable
    GET http://m.dev/touch/src/util/Event.js?_dc=1328652953719 404 (Not Found)
    GET http://m.dev/touch/src/List.js?_dc=1328652953692 404 (Not Found)
    GET http://m.dev/touch/src/DataView.js?_dc=1328652954011 404 (Not Found)
    Originally I did not have the second loader line with the path to Ext and that threw 20 or so errors (nowhere in my debug did it ask for these files to be added to require btw. only the ones above observable in my require list were recommended to be added).
    So I added the 'Ext': 'touch/src' line which took care of that but still stuck on observable and the others.

    Also - isn't the build process supposed to add all the extra sencha classes to my all-classes file? it only adds my own files.

    Thanks

  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    35,704
    Answers
    3356
    Vote Rating
    751
    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 shouldn't use the sencha-touch-all.js for developing and definitely not for building. sencha-touch.js should have Ext.Loader enabled by default as this is the production file and Ext.Loader isn't a production tool. For developing I use sencha-touch-debug.js.

    About the differences between the core files and the files with everything in it, there is a thread going in the bugs forum I think that Ed is handling.
    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.

  3. #3
    Sencha User cyberwombat's Avatar
    Join Date
    Oct 2011
    Posts
    237
    Answers
    6
    Vote Rating
    2
    cyberwombat is on a distinguished road

      0  

    Default


    K. well I will revert to sencha-touch-debug once the differences are fixed - right now I am required to use it in dev in order to have things work normally as far as config.

    But could you address what might be wrong with my app.js? Def says Ext.loader is not enabled.

    To recapitulate. I use the 2 steps in the docs to generate the custom build - I then add my all-classes.js back (I have a prod.html with that in it as well as the sencha-touch.js file).

    Can't figure out why it's not working - just redownloaded B1 to make sure I was using the latest files and I am

  4. #4
    Sencha User cyberwombat's Avatar
    Join Date
    Oct 2011
    Posts
    237
    Answers
    6
    Vote Rating
    2
    cyberwombat is on a distinguished road

      0  

    Default


    Got it!

    The build requires using sencha-touch-debug.js or sencha-debug.js - even though my app doesn't work right now with them I guess the build process doesn't find the sencha files if I use the others in the build directory

  5. #5
    Sencha - Sencha Touch Dev Team rdougan's Avatar
    Join Date
    Oct 2008
    Posts
    1,158
    Answers
    93
    Vote Rating
    6
    rdougan will become famous soon enough

      0  

    Default


    Have you looked at the guide at all? http://docs.sencha.com/touch/2-0/#!/guide/building
    Sencha Inc.
    Robert Dougan - @rdougan
    Sencha Touch 2 and Ext JS 4 Core Team Member, SASS/Theming Wizard.

  6. #6
    Sencha User cyberwombat's Avatar
    Join Date
    Oct 2011
    Posts
    237
    Answers
    6
    Vote Rating
    2
    cyberwombat is on a distinguished road

      0  

    Default


    yes I read it many times - but problem is solved - it had to do with not using any of the sencha files in the build directory which I needed to do due to some pending bug regarding a difference in how sencha-touch-debug.js handles config info compared to the others. So I had switched to build/sencha-touch-all-debug.js and I guess the sdk build system doesn't work with that

Thread Participants: 2

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