View Full Version : Problem with the new framework sencha touch

26 Aug 2011, 7:24 AM
My application used the old version of Sencha Touch which has the version description below:

Ext = {
platformVersion: '0.1',
platformVersionDetail: {
major: 0,
minor: 1,
patch: 0
I just downloaded the current version of Sencha touch.
There are some issues when running my app, somethings does not show.
I have some code like:

pwc.ux.PanelActu = Ext.extend(Ext.Panel, {
layout: 'card',
cls: 'pwc',
scroll: false,
initComponent: function(){
this.facebookButton = new Ext.Button({
text: 'Facebook',
value: 'facebook',
handler: this.switchToCard,
scope: this
this.twitterButton = new Ext.Button({
text: 'Twitter',
value: 'twitter',
handler: this.switchToCard,
scope: this
this.blogButton = new Ext.Button({
text: 'Le Blog',
value: 'blog',
handler: this.switchToCard,
scope: this
this.navigationBar = new Ext.Toolbar({
dock: 'top',
style: 'height:36px',
cls: 'pwc',
id: 'actu_nav',
layout: {
pack: 'justify',
items: [this.facebookButton, this.twitterButton, this.blogButton]

this.dockedItems = this.dockedItems || [];
this.addListener('beforeactivate', this.preLoad);

switchToCard: function(btn){
this.lastButtonSelected = btn;
var selected = btn.value;
for (i = 0; i < this.navigationItems.length; i++)
if (this.navigationItems[i].value == selected){
var card = this.navigationItems[i].card;
if (card)
this.setActiveItem(card, card.animation || 'fade');
this.currentCard = card;


for (i = 0; i < this.navigationBar.items.items.length; i++){


I add a breakpoint at the line "this.setActiveItem(card, card.animation || 'fade' ".
In the javascript console, I write
With the old version Sencha Touch, I obtain a type subclass with un id "ext-layout-1107" which is normal.
But with the new version, I obtain a string "card".
I verified in the documentation, I could not see where I did wrong.
I wish someone could help me.

29 Aug 2011, 11:55 AM
Your question isn't nearly specific enough... I understand that you're not getting the expected output from "this.layout", but you aren't actually explaining what it's preventing you from doing.

For starters, you're expecting to jump from ST 0.1 to ST1.1 - which is a HUGE jump between versions. You should absolutely expect things to be broken.

Secondly, the result you get from "this.layout" is correct - the value should say something like "card". If you were expecting a string like "ext-layout-xxxx" then you need to rewrite whatever depends on that code.