PDA

View Full Version : Sencha and Phonegap 0.9.5



couetbis
28 Jun 2011, 1:51 AM
Hi,
I use Sencha Touch with PhoneGap.
My app doesn't load with PhoneGap 0.9.5 but with 0.9.4 it works.
The error occured on Ext.apply in Viewport.


app.views.Viewport = Ext.extend(Ext.Panel, {
fullscreen: true,
layout: 'card',
cardSwitchAnimation: 'slide',
initComponent: function() {
//put instances of cards into app.views namespace
Ext.apply(app.views, {
accueilView : new app.views.AccueilView(),
typeOrganismeView: new app.views.TypeOrganismeView()
});
//put instances of cards into viewport
Ext.apply(this, {
items: [
app.views.accueilView,
app.views.typeOrganismeView
]
});
app.views.Viewport.superclass.initComponent.apply(this, arguments);
}
});

It works on Chrome but not on phone.

Ideas ?

Hanni Sullivan
28 Jun 2011, 1:56 AM
Can you post the exact error? I'm using PhoneGap 0.9.5.1 without experiencing this problem.

couetbis
28 Jun 2011, 3:22 AM
Error is : "TypeError: cannot read property 'AccueilView' of undefined"

couetbis
28 Jun 2011, 4:38 AM
It's a namespace problem.
http://groups.google.com/group/phonegap/browse_thread/thread/53c9f0d89ca3bd55#

couetbis
28 Jun 2011, 4:42 AM
Closed