1. #1
    Sencha User
    Join Date
    Nov 2011
    Posts
    52
    Answers
    2
    Vote Rating
    1
    testvogel is on a distinguished road

      0  

    Default Unanswered: Sencha Touch 2 + Phonegap + Sencha SDK Tools

    Unanswered: Sencha Touch 2 + Phonegap + Sencha SDK Tools


    Hi,

    I’m trying to use the Sencha SDK Tools 2 by following the guide at

    http://robertdougan.com/posts/packag...ncha-sdk-tools

    The first problem is that the example application is not working for me as long as I’m using the sencha-touch-debug.js. If I’m including the sencha-touch-ALL-debug.js the application is running fine. I get the following errors by using the sencha-touch-debug.js:

    Also the sencha create jsb command is not working if I’m using the sencha-touch-debug.js (sencha-touch-all-debug.js is working fine).
    Is this an mistake in your guide or do I something wrong?

    My own project is using phonegap with plugins because I’m using some device capabilities and I’m unable to build the jsb file. I don’t get any error message, but the jsb is looking like this:

    Code:
    {
        "projectName": "Project Name",
        "licenseText": "Copyright(c) 2011 Company Name",
        "builds": [
            {
                "name": "All Classes",
                "target": "all-classes.js",
                "options": {
                    "debug": true
                },
                "files": []
            },
            {
                "name": "Application - Production",
                "target": "app-all.js",
                "compress": true,
                "files": [
                    {
                        "path": "",
                        "name": "all-classes.js"
                    },
                    {
                        "path": "",
                        "name": "app.js"
                    }
                ]
            }
        ],
        "resources": []
    Here are my index.html and app.js. Does anyone have some ideas what the problem is?

    index.html

    Code:
    <!DOCTYPE html>
    <html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
        <title>sencha phonegap demo</title>
        <link rel="stylesheet" type="text/css" href="lib/css/sencha-touch.css">
        <link rel="stylesheet" type="text/css" href="lib/css/myStyle.css">
        
        <script type="text/javascript" src="app/app.js"></script>
        <script type="text/javascript" src="lib/js/phonegap-1.3.0.js"></script>
        <script type="text/javascript" charset="utf-8" src="lib/js/phonegap-nfc-0.2.0.js"></script>
        <script type="text/javascript" src="lib/js/sencha-touch-all-debug.js"></script>
        <script type="text/javascript" src="lib/js/sha256.js"></script>
    	<script type="text/javascript" src="lib/js/barcodescanner.js"></script>   
       
    	<script type="text/javascript">
            document.addEventListener("deviceready", mainLaunch, false);
        </script> 
    </head>
    <body></body>
    </html>
    app.js

    Code:
    function mainLaunch(){
    	Ext.Loader.setConfig({ enabled: true });
    
    
    	Ext.application({
    		name: 'MyPhoneGapApp',  
    		appFolder: 'app',
    		models: ['Customer','MyModel'],
    		controllers: ['MainController','ProfileController']	,
    	});
    }
    I've also added the required classes at my views. Maybe I forget something but I think than I should get an error message?

    Any ideas or hints would be great...

  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    35,727
    Answers
    3359
    Vote Rating
    752
    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


    While developing your MVC app, you should only use sencha-touch-debug.js not one of the sencha-touch-all JS files. You should not have any console warnings about dynamically loading a class as you should use the requires/uses/views/etc configs in your application classes and Ext.require for things you need loaded upfront. This is what tells the SDK Tools how to create a JSB3 file that is used for the final build. You are getting 404 errors I am assuming because you didn't use the requires configs so the SDK Tools didn't know to include those classes.
    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
    Join Date
    Nov 2011
    Posts
    52
    Answers
    2
    Vote Rating
    1
    testvogel is on a distinguished road

      0  

    Default


    I get the 404 errors by using the cocktails example...

  4. #4
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    35,727
    Answers
    3359
    Vote Rating
    752
    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


    What cocktails example?
    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.

  5. #5
    Sencha User
    Join Date
    Nov 2011
    Posts
    52
    Answers
    2
    Vote Rating
    1
    testvogel is on a distinguished road

      0  

  6. #6
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    35,727
    Answers
    3359
    Vote Rating
    752
    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


    So it's using the requires correctly but after you use the SDK Tools it is still loading these files event after you change from using app.js to app-all.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.

  7. #7
    Sencha User
    Join Date
    Nov 2011
    Posts
    52
    Answers
    2
    Vote Rating
    1
    testvogel is on a distinguished road

      0  

    Default


    I get the four 404 errors before I'm using the SDK tools. After using the sdk tools i get much more 404 errors...

  8. #8
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    35,727
    Answers
    3359
    Vote Rating
    752
    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


    So the SDK Tools aren't building the JSB3 file correctly for you? Odd as it worked no problems for me.
    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.

  9. #9
    Sencha User
    Join Date
    Nov 2011
    Posts
    52
    Answers
    2
    Vote Rating
    1
    testvogel is on a distinguished road

      0  

    Default


    I cannot open the example application (without any modifications) in a browser by using the sencha-touch-debug.js. I always get these 404 errors.

    The jsb file is build without any problems but I cannot open the app in a browser. I always get some 404 errors

  10. #10
    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


    You need to follow the blog post in order for the example to work.

    1. Clone the repository
    2. Download ST2 and put it inside a lib/touch2 folder

    At this point index-debug.html should work

    3. Build the jsb3 file by running `sencha create jsb -a http://localhost/cocktails/index-debug.html -p app.jsb3`
    4. Updating the jsb3 file to include ST2 (under 'Updating the JSB3 File' in the blog post)
    5. Build the compiled JS files by running `sencha build -p app.jsb3 -d .`

    index.html should now work.
    Sencha Inc.
    Robert Dougan - @rdougan
    Sencha Touch 2 and Ext JS 4 Core Team Member, SASS/Theming Wizard.

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