I'm trying out Sencha 2, I can get a nested list to display correctly taking an example from the tutorials, but as soon as I try a simple list variant I get the following error: Uncaught TypeError: Expecting a function in instanceof check, but got #Object
I'm using the exact same code as in the example, with just a change to fit the code in its own file:
Ext.define('layouts.view.TheList', {
extend: 'Ext.List',
xtype: 'thelist',
config: {
title: 'The List',
store: {
fields: ['name'],
data: [
{name: 'Cowper'},
{name: 'Everett'},
{name: 'University'},
{name: 'Forest'}
]
},
itemTpl: '{name}'
}
});
I had the same error. It worked properly when i added the following code
requires: [
'Ext.dataview.List',
'Ext.data.Store',
],
before the 'config:' block.
I'm facing issues with some of my lists, only displaying the content if I set a height value, I don't know what causes this problem yet.
Ext.define('ZF.view.wall.Foo', {
extend: 'Ext.List',
xtype: 'thelist',
config: {
title: 'The List',
height: 600,
store: {
fields: ['name'],
data: [
{name: 'Cowper'},
{name: 'Everett'},
{name: 'University'},
{name: 'Forest'}
]
},
itemTpl: '{name}'
}
});
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With