When using #setData() or #updateData(), I get an error from the Sencha Touch library:
Line 21907 of sencha-touch-all-debug.js:21097:
return me.useEval ? me.evalTpl(code) : (new Function('Ext', code))(Ext);
Uncaught SyntaxError: Unexpected token )
Here is an abbreviated version of where I am calling #setData():
Code:
Ext.define('Project.view.PanelView', {
extend: 'Ext.Panel',
alias: ['widget.apanelview'],
config: {
id: 'aPanelView',
ui: 'light',
tpl: new Ext.XTemplate( '<div>{blah}</div>' )
},
constructor: function( config ) {
this.callParent( arguments );
},
loadRecord: function( json ) {
this.setData( json );
}
});
Unless I misunderstand the use of tpl / setData, I believe I am doing the right thing here. Also, would someone mind clarifying the difference between #setData() and #updateData() for me?
My goal here is to do what #update() does on templates in ExtJS.
Thanks,
RS