dbottillo
13 Sep 2010, 1:45 AM
i have a lot of problem with sencha 0.94!!!
there are a lot of changes...so i have to rewrite my code completely :/
first i have some problem with carousel, code is:
Ext.setup({
tabletStartupScreen: 'assets/logo_portrait2.png',
phoneStartupScreen: 'assets/logo_portrait2.png',
icon: 'icon.png',
glossOnIcon: false,
onReady: function(){
var updateSession = function(){
for (i = 0; i < 5; i++) {
carousel.add(new Ext.Panel({
html:'card'+i
}));
}
carousel.update();
//carousel.setCard('0');
}
var carousel = new Ext.Carousel({
direction: 'horizontal',
activeItem: '1',
defaults: {
cls: 'card'
},
height: 180
});
var detail = new Ext.Panel({
layout: {
type: 'vbox',
align: 'stretch'
},
monitorOrientation: 'true',
items: [carousel]
});
var container = new Ext.Container({
layout: 'card',
title: 'Container',
iconCls: 'more',
items:[detail]
});
var panel = new Ext.TabPanel({
fullscreen: true,
ui: 'dark',
animation: { type: 'cube', direction: 'down' },
tabBar: { dock: 'bottom', layout: { pack: 'center'} },
items: [container],
listeners: {
afterrender: function(){
updateSession();
}
}
});
}
});
this code with 0.93 works fine
with 0.94 chrome inspector say nothing...but it display UNDEFINED and if i switch a card say: 'Uncaught TypeError: Cannot read property 'dom' of undefined'
documentation about carousel is completely different from the previous, there isn't any method to add something to carousel (just addevent and addlistener...!)
in code i try also carousel.doComponentLayout(); but it didn't change anything...
so where is the mistake?
Daniele
there are a lot of changes...so i have to rewrite my code completely :/
first i have some problem with carousel, code is:
Ext.setup({
tabletStartupScreen: 'assets/logo_portrait2.png',
phoneStartupScreen: 'assets/logo_portrait2.png',
icon: 'icon.png',
glossOnIcon: false,
onReady: function(){
var updateSession = function(){
for (i = 0; i < 5; i++) {
carousel.add(new Ext.Panel({
html:'card'+i
}));
}
carousel.update();
//carousel.setCard('0');
}
var carousel = new Ext.Carousel({
direction: 'horizontal',
activeItem: '1',
defaults: {
cls: 'card'
},
height: 180
});
var detail = new Ext.Panel({
layout: {
type: 'vbox',
align: 'stretch'
},
monitorOrientation: 'true',
items: [carousel]
});
var container = new Ext.Container({
layout: 'card',
title: 'Container',
iconCls: 'more',
items:[detail]
});
var panel = new Ext.TabPanel({
fullscreen: true,
ui: 'dark',
animation: { type: 'cube', direction: 'down' },
tabBar: { dock: 'bottom', layout: { pack: 'center'} },
items: [container],
listeners: {
afterrender: function(){
updateSession();
}
}
});
}
});
this code with 0.93 works fine
with 0.94 chrome inspector say nothing...but it display UNDEFINED and if i switch a card say: 'Uncaught TypeError: Cannot read property 'dom' of undefined'
documentation about carousel is completely different from the previous, there isn't any method to add something to carousel (just addevent and addlistener...!)
in code i try also carousel.doComponentLayout(); but it didn't change anything...
so where is the mistake?
Daniele