I m running Sencha Touch V2 beta and I m looking at the most recent documentation.
I ve followed the Ext.application
instructions and am trying to properly lay out my MVC application. Unfortunately I can t figure out how to actually load up a View with this approach.
index.js
Ext.application({
name: rpc ,
defaultUrl: home/index ,
controllers: [ home ], //note: define controllers here
launch: function () {
console.log( Ext.application ~ launch ),
Ext.create( Ext.TabPanel , {
id: rpc-rootPanel ,
fullscreen: true,
tabBarPosition: bottom ,
items: [{
title: Home ,
iconCls: home
}]
});
Ext.create( Ext.viewport.Viewport , {
id: rpc-rootPanel ,
fullscreen: true,
layout: card ,
cardSwitchAnimation: slide
});
}
});
homeController.js
Ext.define( rpc.controller.home , {
extend: Ext.app.Controller ,
views: [ home.index ],
stores: [],
refs: [],
init: function () {
console.log( rpc.controller.home ~ init );
},
index: function () {
console.log( rpc.controller.home ~ index );
}
});
indexView.js
Ext.define( rpc.view.home.index , {
extend: Ext.Panel ,
id: rpc-view-home-index ,
config: {
fullscreen: true,
layout: vbox ,
items: [{
xtype: button ,
text: Videos ,
handler: function () {
}
}],
html: test
}
});
Any help you might be able to offer would be greatly appreciated.