PDA

View Full Version : Sencha Touch MVC



SiCawn
20 Mar 2011, 11:31 PM
Hello,

i am trying to make a simple hello world mvc applikation with the sencha touch.

First i call the controller in my app.js file

launch: function() {
Ext.dispatch({
controller: 'example',
action: 'startingScreen'
});

after that i trying to load a view in my controller



Ext.regController("example", {
startingScreen: function() {
this.listView = this.render({
xtype: 'startScreen',
}, Ext.getBody());
}


finally i have a view



app.startscreen = Ext.extend(Ext.Panel, {

initComponent: function() {
Ext.apply(this, {
title: 'Test',
html : 'Hello World',
});
app.startscreen.superclass.initComponent.apply(this,arguments);

}
});


Ext.reg('startScreen',app.startscreen);


The Controller was loaded, i have checked it, but nothing will displayed. What I've done wrong? Exists any tutorial specially for mvc with Sencha Touch?

StuartAshworth
21 Mar 2011, 1:53 AM
This may be the same problem as this thread discusses - http://www.sencha.com/forum/showthread.php?114688-FIXED-508-0.99-Fullscreen-does-not-work-with-Ext.regApplication%28%29/

gordonjl
23 Mar 2011, 4:36 PM
Start screen doesn't have the attribute
fullscreen:true. Nothing will render until it, or a parent container has that set.