PDA

View Full Version : Tab-Panel Bug on very first tab-change



konki_vienna
6 Dec 2010, 2:52 AM
Hi,
I am testing senchatouch 1.0.1 and tried to implement a tabpanel:


Ext.setup({
icon: 'rsc/img/icon.png',
glossOnIcon: false,
tabletStartupScreen: 'rsc/img/tabletStartScreen.png',

/**
* This function is automatically called when the document has finished loading.
*/
onReady: function() {
new Ext.TabPanel({
fullscreen: true,
ui : 'dark',
sortable : true,
items: [
{
title: 'Tab 1',
html : '1',
cls : 'card1'
},
{
title: 'Tab 2',
html : '2',
cls : 'card2'
},
{
title: 'Tab 3',
html : '3',
cls : 'card3'
}
]
})
}
});

When you click on a tab the very first time, I get this error:



Uncaught TypeError: Cannot read property 'subsequent' of undefinedExt.gesture.Manager.Ext.AbstractManager.addEventListenersencha-touch-debug-w-comments.js:28432Ext.EventManager.addListenersencha-touch-debug-w-comments.js:6290El.Ext.Element.Ext.extend.addListenersencha-touch-debug-w-comments.js:18607Ext.util.Draggable.Ext.extend.setEnabledsencha-touch-debug-w-comments.js:23767Ext.util.Draggable.Ext.extend.enablesencha-touch-debug-w-comments.js:23746Ext.util.Draggable.Ext.extend.constructorsencha-touch-debug-w-comments.js:23735Ext.util.Sortable.Ext.extend.onSortStartsencha-touch-debug-w-comments.js:25669Ext.util.Sortable.Ext.extend.onTouchStartsencha-touch-debug-w-comments.js:25662anonymous:6(anonymous function)sencha-touch-debug-w-comments.js:6513Ext.gesture.Gesture.Ext.extend.firesencha-touch-debug-w-comments.js:28611Ext.gesture.Touch.Ext.extend.onTouchStartsencha-touch-debug-w-comments.js:28681Ext.gesture.Manager.Ext.AbstractManager.handleTargetsencha-touch-debug-w-comments.js:28373Ext.gesture.Manager.Ext.AbstractManager.handleTargetssencha-touch-debug-w-comments.js:28349Ext.gesture.Manager.Ext.AbstractManager.onTouchStartsencha-touch-debug-w-comments.js:28239(anonymous function)sencha-touch-debug-w-comments.js:5074


Any suggestion on what went wrong?
Thanx in advance.

Salva
13 Dec 2010, 3:59 AM
Have you managed to solve it? I'm getting exactly the same error (using sencha-1.0.1), I have a tabpanel which throws an error just the first time that an option is selected (from the second tap/click onwards, it works perfectly).

If it helps, the resulting error (in Safari's console) is: TypeError: Result of expression 'options' [undefined] is not an object.

The error happens because options is undefined inside the if in the following code:


// If there is already a finger down, then instantly start the gesture
if (this.startedChangedTouch && this.currentTargets.contains(target) && !gesture.started && !options.subsequent) {
this.startGesture(gesture);
if (gesture.listenForStart) {
gesture.onTouchStart(this.startEvent, this.startedTouches[0]);
}
}


I tried to debug it, but unfortunately I got to a point where I got lost inside Sencha's code :(

Any help would be appreciated. It's not a major bug, but it's certainly annoying.

konki_vienna
13 Dec 2010, 4:05 AM
No, I hope(d) to get a BugFix by the SenchaExperts...
No solution found yet. Would appreciate a fix as well! :)

Salva
13 Dec 2010, 7:40 AM
Hi Konki,

I decided to compare your code with mine, and I noticed I had left 'sortable: true', but I didn't really need it (things that happen when you copy paste from the examples ^^). Removing that property fixed the problem.

Regards,
Salva