1. #1
    Sencha User
    Join Date
    Jun 2011
    Posts
    7
    Vote Rating
    0
    Magnetica is on a distinguished road

      0  

    Exclamation mvc offline application

    mvc offline application


    i have this problem. i've made a sencha touch application using MVC model and it works like a charm in safari and in the emulator but not in my devices.
    the simple code is:

    Code:
    Ext.setup({
    tabletStartupScreen: 'tablet_startup.png',
    phoneStartupScreen: 'phone_startup.png',
    icon: 'icon.png',
    glossOnIcon: false,
    fullscreen: true
    });
    
    
    BT = new Ext.Application({
    name: "BT",
    launch: function () {
        this.viewport = new BT.Viewport();
    }
    });
    creating the viewport show me a white screen. i have no bugs in debugger or crash reports in my devices.. only a white screen. the BT.Viewort is a simple panel with a docked bar.
    any idea, please?
    my App was rejected by Apple because i'v made my tests only on emulator. the first version of the application wasn't MVC and it had no problems.
    thanks in advance
    Emiliano

  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    37,015
    Vote Rating
    847
    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 Ext.setup when using Ext.application

    You shouldn't do BT = new Ext.Application, you should just do Ext.application.

    Your views should be placed in the BT.views namespace, not just BT.

    In the launch method fired on the device?
    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
    Jun 2011
    Posts
    7
    Vote Rating
    0
    Magnetica is on a distinguished road

      0  

    Post


    hi,
    i've made thi correction but now it doesn't run in emulator too..

    Code:
    Ext.Application({
        name: "BT",
         launch: function () {
            alert('ok: ');
            this.views.viewport = new BT.Viewport();
    
    
        }
    });
    the alert is not shown.. so the launch event is not fired, i suppose..

    if I leave this:

    Code:
    BT = new Ext.Application
    i can see the alert in emulator and device, but application doesn't run.
    if i leave
    this.viewport = new BT.Viewport();
    instead of
    this.views.viewport = new BT.Viewport();
    application run in emulator but not in device.

    any idea?




  4. #4
    Sencha User
    Join Date
    Jun 2011
    Posts
    7
    Vote Rating
    0
    Magnetica is on a distinguished road

      0  

    Exclamation


    sorry for mistake..

    i've made some changes but with no results.
    now, as before, my app runs via browser and in iPhone emulator but not on my device.

    Code:
    Ext.regApplication({
        name: "BT",
        launch: function () {
    
    
            this.views.viewport = new BT.views.Viewport();
    
    
        }
    });
    i'm so frustrated
    no infos from debugger and no crash reports.
    it simply doesn't open my panel.
    what's wrong?????

  5. #5
    Sencha User
    Join Date
    Aug 2011
    Location
    London
    Posts
    393
    Vote Rating
    16
    digeridoopoo will become famous soon enough

      0  

    Default What version on your device?

    What version on your device?


    What version of os/safari do you have on your device, is it different to the simulator/desktop browser? I did have some strange errors on safari iOS 5 at first, I think there is a little bug which gave me a white screen. I quit safari completely and tried again and it worked...

    Did you try posting parts of the code in senchafiddle.com as well?

Thread Participants: 2

Tags for this Thread