PDA

View Full Version : API and EXT.Application



ainden
30 Oct 2010, 12:14 PM
The API states that EXT.Application class represents a sencha application. I cannot find it used in any example. I would think that I would code something like:




Ext.setup({
glossOnIcon: false,

onReady: function() {
bh.Main = new bh.views.Main();
bh.Application = new Ext.Application({
name: 'bh',
profiles: {
phone: function() {
return Ext.is.Phone;
},
tabletPortrait: function() {
return Ext.is.Tablet && Ext.orientation == 'portrait';
},
tabletLandscape: function() {
return Ext.is.Tablet && Ext.orientation == 'landscape';
}
},
launch: function() {
this.viewport = new Ext.Panel({
fullscreen: true,

id : 'mainPanel',
layout: 'card',
items : [
bh.Main
]
});
}
});
}
});



but when I do I get:




TypeError: Result of expression 'Ext.Application' [undefined] is not a constructor.



If I test for Ext.Application:



alert(Ext.Application);


the results is that Ext.Application is undefined.


Can someone explain 'Ext.Application' and how it should be used?

jamesgpearce
1 Nov 2010, 9:44 AM
Are you still running 0.97?

0.98 contains Ext.Application without having to manually add it in to the library yourself.

Steffen Hiller
1 Nov 2010, 10:39 AM
Check the kiva and twitter examples in 0.98. They now use the new MVC stuff.

jop_008
24 May 2012, 2:55 AM
Any idea?

Thanks John

punitkg
3 Sep 2012, 4:01 AM
I have the latest version of sencha 2.0.1.1 but I get the same error. In fact I cannot even run the hello world program without running into that problem.

Please help