DaveC426913
24 Nov 2010, 9:46 AM
I am just upgrading to 1.0. The first error is
Object function scrollMe(listId,direction){...} has no method 'createDelegate'
I don't know if this is no longer supported (I do see references to it in the sencha-touch.js), or if it's just slightly incompatible with the way I implemented it when running Beta Sencha versions.
Trouble is, this createDelegate was a method that was gifted to me, so I don't really know how to debug it.
MERCON.UI.Component.scrollButtons = Ext.extend(Ext.Container, {
thisItem: this,
initComponent: function() {
var config = {
id: 'scroller',
cls: 'scroller',
items: [{
xtype: 'button',
handler: scrollMe.createDelegate(null, [this.MRC_panelid,-1], false),
cls: 'btnUp',
html: '<img src="img/glyph_up.png">',
},{
xtype: 'button',
handler: scrollMe.createDelegate(null, [this.MRC_panelid,1], false),
cls: 'btnDn',
html: '<img src="img/glyph_dn.png">',
}]
}
Ext.apply(this, Ext.apply(this.initialConfig, config));
MERCON.UI.Component.scrollButtons.superclass.initComponent.apply(this, arguments);
function scrollMe(listId,direction){
scrollingList = Ext.getCmp(listId);
var scroller = scrollingList.scroller,
offsets = scroller.getOffset();
lineHeight=25;//the height of one line of text - hardcoded for now
scrollAmt = (scrollingList.height-lineHeight)*direction;//
scroller.scrollTo( {x: offsets.x,y: offsets.y + scrollAmt}, true);
}
},
Object function scrollMe(listId,direction){...} has no method 'createDelegate'
I don't know if this is no longer supported (I do see references to it in the sencha-touch.js), or if it's just slightly incompatible with the way I implemented it when running Beta Sencha versions.
Trouble is, this createDelegate was a method that was gifted to me, so I don't really know how to debug it.
MERCON.UI.Component.scrollButtons = Ext.extend(Ext.Container, {
thisItem: this,
initComponent: function() {
var config = {
id: 'scroller',
cls: 'scroller',
items: [{
xtype: 'button',
handler: scrollMe.createDelegate(null, [this.MRC_panelid,-1], false),
cls: 'btnUp',
html: '<img src="img/glyph_up.png">',
},{
xtype: 'button',
handler: scrollMe.createDelegate(null, [this.MRC_panelid,1], false),
cls: 'btnDn',
html: '<img src="img/glyph_dn.png">',
}]
}
Ext.apply(this, Ext.apply(this.initialConfig, config));
MERCON.UI.Component.scrollButtons.superclass.initComponent.apply(this, arguments);
function scrollMe(listId,direction){
scrollingList = Ext.getCmp(listId);
var scroller = scrollingList.scroller,
offsets = scroller.getOffset();
lineHeight=25;//the height of one line of text - hardcoded for now
scrollAmt = (scrollingList.height-lineHeight)*direction;//
scroller.scrollTo( {x: offsets.x,y: offsets.y + scrollAmt}, true);
}
},