stirucherai
11 Dec 2011, 9:31 PM
Hi,
I have code which had following
Main View : Just in incantations topPanel and bottomPanel using xtype:{'topPanel'}
topPanel View
bottomPanel View
In the Main controller was using getMainview=this.getMainView().create();
All was working fine with PR1 but when I copied PR3 (sencha-touch-debug.js) -- I don't see topPanel and bottomPanel. I checked in javascript console and these were never created. No error as well.
Any help will be highly apperciated
rdougan
11 Dec 2011, 11:53 PM
I'm afraid I cannot help without a better explanation and some code.
stirucherai
12 Dec 2011, 2:39 AM
app.js
Ext.Loader.setConfig({ enabled: true });
Ext.require([
'Ext.XTemplate',
'Ext.Panel',
'Ext.Button',
'Ext.List'
]);
Ext.application( {
name : 'NDP',
controllers: ['Main'],
initialize: function() {
console.log("Entering App Initialization");
//var dbconnval = {dbName : "contacts", dbDescription: "testdb"};
//Ext.DbConnection = new Ext.Sqlite.Connection(dbconnval);
},
launch:function()
{
}
});
Main.js (Contoller)
Ext.define('NDP.controller.Main', {
extend: 'Ext.app.Controller',
config: {
},
views : [
'Main',
'topPanel',
'bottomPanel',
'bottomLeftPanel'
],
stores: [ 'menuList'
,'pattuLyric'
],
init: function() {
console.log('Init home controller');
getMainview=this.getMainView().create();
}
});
Main.js (View)
Ext.define('NDP.view.Main', {
extend: 'Ext.Container',
layout: 'vbox',
title: "Home View",
xtype:'main',
requires: [
'NDP.view.topPanel',
'NDP.view.bottomPanel',
'NDP.view.bottomLeftPanel',
'NDP.view.bottomRightPanel'
],
config: {
fullscreen : true,
layout :
{
type : 'vbox'
},
items: [
{
xtype:'topPanel',
id:'topPanel',
flex:1
},
{
xtype:'bottomPanel',
id:'bottomPanel',
flex:1
}
]
},
initialize: function() {
console.log('initialize home view');
}
});
topPanel.js (View)
Ext.define('NDP.view.topPanel', {
extend: 'Ext.Panel',
layout: 'fit',
alias: 'widget.topPanel',
xtype:'topPanel',
config: {
items: [{
xtype:'toolbar',
defaults: {
iconMask: true,
ui: 'plain'
},
items:[{xtype:'spacer'},
{
xtype:'panel',
id:"scaleValue",
style:"color:black; background-color:white",
height:50,
width:300
}]
}]
},
initialize: function() {
console.log("Init: topPanel Log");
}
});
bottomPanel.js (view)
Ext.define('NDP.view.bottomPanel', {
extend: 'Ext.Panel',
xtype:'bottomPanel',
requires: [
'NDP.view.bottomLeftPanel',
'NDP.view.bottomRightPanel',
],
config: {
layout:'hbox',
flex:1,
items: [{
xtype:'bottomLeftPanel',
id:'bottomLeftPanel',
flex:.3
},
{
xtype:'bottomRightPanel',
id:'bottomRightPanel',
flex:.7
}
]
},
initialize: function() {
console.log("Init: bottomPanel Log");
}
});
As mentioned -- the same code works with no issues on PR1. When I copied PR3 no error but it does not reach topPanel.js or bottomPanel.js
stirucherai
13 Dec 2011, 3:40 AM
Just removed the init:{ <What ever code >} from each of the view and it worked.
Powered by vBulletin® Version 4.2.3 Copyright © 2018 vBulletin Solutions, Inc. All rights reserved.