Results 1 to 5 of 5

Thread: mvc offline application

  1. #1
    Sencha User
    Join Date
    Jun 2011
    Posts
    7
    Vote Rating
    0
      0  

    Exclamation 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 - Sr Software Engineer mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    39,556
    Vote Rating
    1272
      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 @LikelyMitch
    Sencha Inc, Senior Software Engineer
    ________________
    Learn BBCode and use it! Checkout the CODE tag!

    Check out my GitHub, lots of nice things for Ext JS and Sencha Touch
    https://github.com/mitchellsimoens

  3. #3
    Sencha User
    Join Date
    Jun 2011
    Posts
    7
    Vote Rating
    0
      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
      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
    454
    Vote Rating
    22
      0  

    Default 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?

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •