PDA

View Full Version : mvc offline application



Magnetica
12 Dec 2011, 8:26 AM
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:


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

mitchellsimoens
12 Dec 2011, 9:22 AM
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?

Magnetica
12 Dec 2011, 10:57 AM
hi,
i've made thi correction but now it doesn't run in emulator too..


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:


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?

Magnetica
13 Dec 2011, 1:43 PM
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.


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

digeridoopoo
14 Dec 2011, 1:12 AM
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?