1. #1
    Sencha User
    Join Date
    Dec 2011
    Posts
    103
    Vote Rating
    0
    mike lebowski is on a distinguished road

      0  

    Default Ext.Loader.setConfig paths seems to work in phonegap ios but not phonegap android?

    Ext.Loader.setConfig paths seems to work in phonegap ios but not phonegap android?


    In my app.js I have this:

    Code:
    Ext.Loader.setConfig({    enabled: true,
        paths: {
            'Ext.ux.touch.grid': './lib/Ext.ux.touch.grid'
        }
    });
    
    
    Ext.require([
        'Ext.ux.touch.grid.View',
        'Ext.ux.touch.grid.feature.Feature',
        'Ext.ux.touch.grid.feature.HeaderMenu',
        'Ext.ux.touch.grid.feature.Sorter'
    ]);
    And in my app, I have
    www/app.js
    www/lib/touch/sencha*.js
    www/lib/Ext.ux.touch.grid/*

    When I ran this in the browser it was fine.
    Now I am trying to run the app in Phonegap. I made the prescribed phonegap adjustments. After working past one bug in ios that needed a patch applied (even for sp3 ??) , I get it running in ios simulator (with some caveats), but in the android simulator, I get only white screen and in log I see that it cannot find the required js files:

    12-11 21:14:14.588: E/Web Console(529): Uncaught Error: [Ext.Loader] Failed loading './lib/Ext.ux.touch.grid/View.js', please verify that the file exists at file:///android_asset/www/lib/touch/sencha-touch-all-debug-w-comments.js:7785

    Now, remember, this works fine in ios simulator. So is there just a bug in android or am I using a relative path that is ok for ios but not ok for android? Or other problem?

    And, yes, I have verified that the files are in the expected location in the apk file.

  2. #2
    Sencha User
    Join Date
    Dec 2011
    Posts
    103
    Vote Rating
    0
    mike lebowski is on a distinguished road

      0  

    Default


    also, note that i have app.js in the www folder. This IS an MVC app, and I notice that some people are putting the app.js in the app folder (e.g. www/app/app.js ) in new MVC samples.
    I doubt my app.js location is affecting the resolution of the setConfig paths , but you never know.
    Fwiw, is the movement to put app.js in apps folder in touch 2.0 MVC apps just a stylistic recommendation?

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

      0  

    Default


    I'm not sure what is going on without some debugging, which I cannot do right now. I'm not even sure if it will work, because of the way Android is.

    However, you really should not use the loader on device, as there is a huge performance penalty.

    I actually just wrote a blog post on how to package your ST2 MVC application the other day: http://robertdougan.com/posts/packag...ncha-sdk-tools
    Sencha Inc.
    Robert Dougan - @rdougan
    Sencha Touch 2 and Ext JS 4 Core Team Member, SASS/Theming Wizard.

  4. #4
    Sencha User
    Join Date
    Dec 2011
    Posts
    103
    Vote Rating
    0
    mike lebowski is on a distinguished road

      0  

    Default


    I have no vested interest in using Ext.Loader. This is my first sencha app and I was just following what I thought was best practice as seen in various samples. I am perfectly open to alternatives, but I am not sure what the alternative is. Looking at your referenced blog, is it this approach you recommend?

    Code:
    {
        "name": "Application - Production",    "target": "app-all.js",    "compress": true,    "files": [        {            "path": "lib/touch2/",            "name": "sencha-touch-debug.js"        },         {
    where I should add the other "required" files to the that files array?

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

      0  

    Default


    If you are using MVC, then all of your application files should be automatically included into that file.
    Sencha Inc.
    Robert Dougan - @rdougan
    Sencha Touch 2 and Ext JS 4 Core Team Member, SASS/Theming Wizard.

  6. #6
    Sencha User
    Join Date
    Dec 2011
    Posts
    103
    Vote Rating
    0
    mike lebowski is on a distinguished road

      0  

    Default


    hmm, that section is about the packaging of files for production using the jsb3 utility. That is all fine, and I intend to do that when i am ready for production, but I am no where near ready for production. So in mean time I need to figure out a way to include these library files that works on both ios and android.

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

      0  

    Default


    Can't you just manually add them into the index.html file like you normally would?
    Sencha Inc.
    Robert Dougan - @rdougan
    Sencha Touch 2 and Ext JS 4 Core Team Member, SASS/Theming Wizard.

  8. #8
    Sencha User
    Join Date
    Dec 2011
    Posts
    103
    Vote Rating
    0
    mike lebowski is on a distinguished road

      0  

    Default


    I will try. Like i said, I was following sample code that I found. I honestly do not know why the sample did not just do what you are recommending.

  9. #9
    Sencha User Surykat's Avatar
    Join Date
    Jul 2011
    Location
    BIALYSTOK, Poland
    Posts
    58
    Vote Rating
    1
    Surykat is on a distinguished road

      0  

    Default


    I have the same problem ;/ and I'm running out of ideas to reduce that...

    Everythings works fine until I have updated my Android version at my tablet. It fails in loading first file by the Ext.Loader (in my case it's Main.js controller). I tried to change paths and other properties without result..

    In browser everything is loading perfectly, but during Android packaging I see same error like You. I read somewhere about not using Ext.Loader at device in production mode.. but I'm developing right now and I want to test my app at device.

    Any help appreciated.

  10. #10
    Sencha User conrad.decker's Avatar
    Join Date
    Oct 2011
    Location
    Jacksonville Beach, Florida
    Posts
    6
    Vote Rating
    0
    conrad.decker is on a distinguished road

      0  

    Default


    I'm seeing the same issue. Seems odd that it's not picking up those files.

    All of my debugging seems to be pointing me to the fact that those files are being referenced correctly, but just failing to load. I can't find any reference to this anywhere else though so I'm wondering if it's something specific to the way we've got the individual pieces set up. I've tried moving everything around to different locations but still no luck.

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