Threaded View
-
24 Sep 2012 11:51 PM #1
Sencha Touch DataItem and DataView.useComponents incompatible with Architect 2.1
Sencha Touch DataItem and DataView.useComponents incompatible with Architect 2.1
I created a trivial ST2 app in Architect 2.1 using one DataView with useComponents : true
and linked it to a trivial DataItemCode:Ext.define('MyApp.view.MyDataView', { extend: 'Ext.dataview.DataView', config: { defaultType: 'mydataitem', store: 'MyDirectStore', useComponents: true, itemConfig: { xtype: 'mydataitem' } } });
But I can only get this to work if I hand edit MyDataItem and put this lineCode:Ext.define('MyApp.view.MyDataItem', { extend: 'Ext.dataview.component.DataItem' config: { padding: 10, layout: { type: 'hbox' }, items: [ { xtype: 'component', flex: 1, html: 'here' } ] }, updateRecord: function(record) { // Provide an implementation to update this container's child items } });
in front of the config. Otherwise when I run it I get the errorCode:xtype: 'mydataitem',
Uncaught Error: [ERROR][Ext.Container#setDefaultType] Invalid defaultType of: 'mydataitem', must be a valid component xtype
Sencha Architect 2.1 won't let me put the xtype in. If I try it says
A custom config cannot override a reserved config...
However, if I hand edit the xtype property into MyDataItem, Sencha Architect removes whenever I save the project.
What should I do ?
Looks like we can't reproduce the issue or there's a problem in the test case provided.


Reply With Quote