Having tried a simple List example on Sencha Touch 2, I get the message "Uncaught TypeError"

I am testing Sencha 2, I can get a nested list to correctly display an example from the tutorials, but as soon as I try a simple version of the list, I get the following error: Uncaught TypeError: expecting a function in instanceof check, but got #Object

I use the same code as in the example, only with a change that matches 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}' } }); 
+7
source share
2 answers

I had the same error. It worked correctly when I added the following code

 requires: [ 'Ext.dataview.List', 'Ext.data.Store', ], 

before the "config:" block.

+9
source

I run into problems with some of my lists, only showing content, if I set the height value, I don't know what else causes this problem.

 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}' } }); 
+2
source

All Articles