Results 1 to 3 of 3

Thread: problem with requires. requires Ext.dataview.List causing Uncaught TypeError

  1. #1
    Touch Premium Member
    Join Date
    Apr 2007
    Posts
    118
    Answers
    2

    Default Answered: problem with requires. requires Ext.dataview.List causing Uncaught TypeError

    Hi I'm using Sencha 2.01 RC. I've been following some of the basic examples to get started... I have got my app to work fine, but when I go to supply the right requires for my view Google chrome is generating an error. If I add requires Ext.dataview.List then I get the error Uncaught TypeError: Expecting a function in instanceof check, but got #<Object>

    It has no problem if I just have requires 'Ext.data.proxy.JsonP'.. I don't understand it.

    Here is my code.. any help, greatly appreciated:

    Code:
    Ext.define("ADTouch.view.Agencies", {
        extend: 'Ext.navigation.View',
     	xtype:'agenciespanel',
    	
    	requires: [
    		'Ext.data.proxy.JsonP',
    		'Ext.dataview.List'   //THIS LINE CAUSES THE ERROR.
    		
    	],
    		
    	
        config: {
           title:'Agencies',
    	   iconCls: 'home',
    	   
    	   items:[
    
    	   		{
    	   		xtype:'list',
    			itemTpl:'{agencyname}',
    			title:'Agencies',
    			grouped: true,
    			indexBar: true,
    			
    			store:{
    				autoLoad:true,
    				sorters: 'agencyname',
    				
    				grouper: {
    				   groupFn: function(record) {
    				       return record.get('agencyname')[0];
    				   }
    				},
    				
    				fields:['agencycode','agencyname','agencyurl','agencydescription'],
    				proxy:{
    					type:'jsonp',
    					url: 'cfm/dbmodel/getAgencies.cfm',
                        reader: {
                            type: 'json',
                            rootProperty: 'DATA'
                        }					
    				}
    			}
    	   }]
        }
    });

  2. I added 'Ext.data.Store' to the list of 'requires' to solve this.

  3. #2
    Sencha User
    Join Date
    Apr 2012
    Posts
    1
    Answers
    1

    Default

    I added 'Ext.data.Store' to the list of 'requires' to solve this.

  4. #3
    Touch Premium Member
    Join Date
    Apr 2007
    Posts
    118
    Answers
    2

    Default

    manojtc thanks much that resolved it + makes sense... store wasn't given on the ext loader warnings for async loadings... thanks again.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •