PDA

View Full Version : Console message with a tab in tabPanel



eyetv
3 Jan 2011, 9:37 AM
Hello,

I'm a newbies with Sencha Touch

I have 2 tabs in a tabPanel, the first time I try to activate a tab in a tabPanel, I have a message in the console

for information : I used the code from the tabPanel example

sencha-touch-debug.js:18333TypeError: Result of expression 'options' [undefined] is not an object.



My code


Ext.regModel('modelListeProfils', {
fields: [{name: 'text', type: 'string'}]
});

var storeListeProfils = new Ext.data.TreeStore({
model: 'modelListeProfils',
proxy: {
type: 'ajax',
url : '../php/recupListeProfils.php',
reader: {
type: 'tree',
root: 'items'
}
}
});

var nestedList = new Ext.NestedList({
fullscreen: true,
title: 'Liste des profils',
displayField: 'text',
store: storeListeProfils
});





Ext.setup({
onReady: function() {
var tab=new Ext.TabPanel({
tabBar:{
dock:'bottom',
ui:'light',
layout:{
pack:'center'
}
},
fullscreen: true,
ui : 'dark',
sortable : true,
cardSwitchAnimation : 'slide',
defaults:{
scroll:'vertical'
},
items: [{
title: 'Profils',
iconCls:'profil',
layout:'fit',
items:[nestedList],
listeners:{
activate:function(){
storeListeProfils.load();
}
}
},{
title: 'Campagnes',
html : '2',
iconCls:'campagne'
}]
});
}
});

vunction
3 Feb 2011, 3:24 PM
Hello,

I was getting the same error on the tabPanel example.


sencha-touch-debug.js:18333TypeError: Result of expression 'options' [undefined] is not an object.

Remove the sortable option and the error goes away. Hopefully you don't need the sortable.


Patrick