perry_jia
23 Nov 2011, 6:26 AM
U]REQUIRED INFORMATION[/U]Ext version tested:
Sencha Touch 2.0PR2
Browser versions tested against:
Chrome 11 (Windows)
Description:
tab panel event listeners error.
Steps to reproduce the problem:
Create Ext.tab.Panel which contains two same child (xtype: 'child')
Override initialize method of Child panel, and alert some informations, strange!!
The result that was expected:
false
true
id: child1
The result that occurs instead:
false
false
id: child1
id: child1
Test Case:
Ext.setup({
onReady : function() {
// child
Ext.define('Child', {
extend: 'Ext.Container',
xtype: 'child',
config: {
items: [{
xtype: 'sliderfield',
label: 'Single Thumb'
}, {
xtype: 'togglefield',
label: 'Toggle Thumbs'
}]
},
initialize: function() {
alert('is hidden? ' + this.isHidden());
this.on('show', function(cmp) {
alert('id: ' + cmp.getId());
})
}
});
// Tab Panel
Ext.define('MyTanPanel', {
extend: 'Ext.tab.Panel',
config: {
tabBarPosition: 'top',
items: [{
title: 'child1',
xtype: 'child',
id: 'child1'
}, {
title: 'child2',
xtype: 'child',
id: 'child2'
}]
}
});
Ext.create('MyTanPanel').show();
}
});
Sencha Touch 2.0PR2
Browser versions tested against:
Chrome 11 (Windows)
Description:
tab panel event listeners error.
Steps to reproduce the problem:
Create Ext.tab.Panel which contains two same child (xtype: 'child')
Override initialize method of Child panel, and alert some informations, strange!!
The result that was expected:
false
true
id: child1
The result that occurs instead:
false
false
id: child1
id: child1
Test Case:
Ext.setup({
onReady : function() {
// child
Ext.define('Child', {
extend: 'Ext.Container',
xtype: 'child',
config: {
items: [{
xtype: 'sliderfield',
label: 'Single Thumb'
}, {
xtype: 'togglefield',
label: 'Toggle Thumbs'
}]
},
initialize: function() {
alert('is hidden? ' + this.isHidden());
this.on('show', function(cmp) {
alert('id: ' + cmp.getId());
})
}
});
// Tab Panel
Ext.define('MyTanPanel', {
extend: 'Ext.tab.Panel',
config: {
tabBarPosition: 'top',
items: [{
title: 'child1',
xtype: 'child',
id: 'child1'
}, {
title: 'child2',
xtype: 'child',
id: 'child2'
}]
}
});
Ext.create('MyTanPanel').show();
}
});