PDA

View Full Version : [Ext.Container#doAdd] Adding has card à has tab container without specifying any tab?



gizmoone
23 Jul 2012, 1:19 AM
Hello,


I am still in my phase of apprenticeship of sencha touch.
I have tested and modified individually the examples:

- https://github.com/senchalearn/Tabs-and-Toolbars
- https://github.com/senchalearn/Presidents


Next I wanted to leave the example Tabs-and-Toolbars and call the example President.


The problem is that at the time of the launch of the application I have this error message.


Uncaught Error: [ERROR][Ext.Container#doAdd] Adding has card à has tab container without specifying any tab configuration


This message disparait when I deactivate the line {xtype: 'mainpanel'}

app/view/Main.js


Ext.define('proto.view.Main', {
extend: 'Ext.TabPanel',
requires: [
'proto.view.Home',
'proto.view.More',
'proto.view.Fonction'
],


config: {
tabBar: {
docked: 'bottom',
layout: {
pack: 'center'
}
},
items: [
{ xtype: 'homecard' },
{ xtype: 'morecard' },
{ xtype: 'mainpanel' }

]
}
});



app/view/Fonction.js (same Main.js of Presidents module)


Ext.define('proto.view.Fonction', {
extend: 'Ext.navigation.View',
xtype: 'mainpanel',

requires: [
'proto.view.FonctionList',
'proto.view.FonctionDetail'
],


config: {
items: [{
xtype: 'fonctionlist'
}]
}
});



app/view/FonctionList.js (same of PresidentList.js)


Ext.define('proto.view.FonctionList', {
extend: 'Ext.List',
xtype: 'fonctionlist',

requires: ['proto.store.Fonctions'],

config: {
title: 'Liste des fonctions',
grouped: true,
itemTpl: '{Name} {Id}',
store: 'Fonctions',
onItemDisclosure: true
}
});


thanks for your help

gizmoone
24 Jul 2012, 1:20 AM
this point is closed for me.

I solved this point with ad :



title: 'Fonctions',
iconCls: 'user'


finaly :

config: { title: 'Fonctions',
iconCls: 'user',
items: [{
xtype: 'fonctionlist'

}]
}