-
12 Dec 2011 8:26 AM #1
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:
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.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(); } });
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
-
12 Dec 2011 9:22 AM #2Sencha - Senior Forum Manager
- Join Date
- Mar 2007
- Location
- St. Louis, MO
- Posts
- 33,582
- Vote Rating
- 433
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
________________
http://www.JSONPLint.com - Source to lint your JSONP!
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 almost in print!
When posting code, please use BBCode's CODE tags.
-
12 Dec 2011 10:57 AM #3
hi,
i've made thi correction but now it doesn't run in emulator too..
the alert is not shown.. so the launch event is not fired, i suppose..Code:Ext.Application({ name: "BT", launch: function () { alert('ok: '); this.views.viewport = new BT.Viewport(); } });
if I leave this:
i can see the alert in emulator and device, but application doesn't run.Code:BT = new Ext.Application
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?
-
13 Dec 2011 1:43 PM #4
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.
i'm so frustratedCode:Ext.regApplication({ name: "BT", launch: function () { this.views.viewport = new BT.views.Viewport(); } });
no infos from debugger and no crash reports.
it simply doesn't open my panel.
what's wrong?????
-
14 Dec 2011 1:12 AM #5
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?


Reply With Quote