1. #1
    Sencha User
    Join Date
    Sep 2010
    Posts
    19
    Vote Rating
    0
    fermina is on a distinguished road

      0  

    Default Uncaught TypeError: Cannot call method 'split' of undefined (ext-touch-debug.js:9555

    Uncaught TypeError: Cannot call method 'split' of undefined (ext-touch-debug.js:9555


    Hi,

    I have a problem to load data on Store.
    The image file attached shows error I've got.
    the code I made is below.
    Please, help me!

    Code:
    <script type="text/javascript" src="../../ext-touch-debug.js"></script>
      <script type="text/javascript">
       Ext.setup({
        tabletStartupScreen: 'resources/img/tablet_startup.png',
        phoneStartupScreen: 'resources/img/phone_startup.png',
        icon: 'resources/img/icon.png',
        glossOnIcon: false,
     
        onReady: function() {
         var data = {
          person: [{
           id: '0001',
           name: 'James'
          }, {
           id: '0002',
           name: 'Tom'
          }]
         };
         var tpl = new Ext.XTemplate(
          '<tpl for=".">',
           '<p>{#}. {name}</p>',
          '</tpl></p>'
         );
         Ext.regModel('tModel', {
          fields: [
           {name: 'id', type: 'string'},
           {name: 'name', type: 'string'}
          ]
         });
         this.tStore = new Ext.data.JsonStore({model: 'tModel'});
         this.tStore.loadData(data.person);
         var viewport = new Ext.List({
          fullscreen: true,
          scroll: 'vertical',
          tpl: tpl,
          store: this.tStore
    //      data: data.person
         });
        }
       });
      </script>
    Attached Images

  2. #2
    Sencha User
    Join Date
    Jun 2010
    Posts
    59
    Vote Rating
    0
    dddesign is on a distinguished road

      0  

    Default


    I have the same problem...

  3. #3
    Sencha User
    Join Date
    Jun 2010
    Posts
    59
    Vote Rating
    0
    dddesign is on a distinguished road

      0  

    Default


    I have the same problem, see this example:
    http://www.dddesign.ch/mobile_apps/weather/
    any tips?

  4. #4
    Touch Premium Member
    Join Date
    Dec 2007
    Posts
    109
    Vote Rating
    1
    tfrugia is on a distinguished road

      0  

    Default


    I ran into this problem too. You need to provide an itemSelector to the Ext.List .

    ie:

    Code:
    <script type="text/javascript">
    Ext.setup({
    	tabletStartupScreen: 'resources/img/tablet_startup.png',
    	phoneStartupScreen: 'resources/img/phone_startup.png',
    	icon: 'resources/img/icon.png',
    	glossOnIcon: false,
    
    	onReady: function() {
    		var data = {
    			person: [{
    				id: '0001',
    				name: 'James'
    			}, {
    				id: '0002',
    				name: 'Tom'
    			}]
    		};
    		var tpl = new Ext.XTemplate(
    			'<tpl for=".">',
    			'<p class="someClass">{#}. {name}</p>',
    			'</tpl></p>'
    		);
    		Ext.regModel('tModel', {
    			fields: [
    				{name: 'id', type: 'string'},
    				{name: 'name', type: 'string'}
    			]
    		});
    		this.tStore = new Ext.data.JsonStore({model: 'tModel'});
    		this.tStore.loadData(data.person);
    		var viewport = new Ext.List({
    			itemSelector: 'p.someClass',
    			fullscreen: true,
    			scroll: 'vertical',
    			tpl: tpl,
    			store: this.tStore
    		});
    	}
    });
    </script>

  5. #5
    Sencha User
    Join Date
    Jun 2011
    Posts
    18
    Vote Rating
    0
    Akrion is on a distinguished road

      0  

    Default


    I had similar situation and my problem was that I forgot to provide the record element to the proxy.

    Example:

    Code:
    proxy: 
        {
            type: 'ajax',
            url: 'app/data/entities.xml',
            reader: 
            {
                type: 'xml',
                root: 'Entities',
                record: 'Entity' //you get the same error if you miss to provide this
            }
        },
    My xml data was in the following format:

    Code:
    <?xml version="1.0" encoding="UTF-8"?>
    <Entities>
    	<Entity>
    		<id>1</id>
    		<fname>Bob</fname>
    		<lname>Dole</lname>
    		<description>Boddy!</description>
    		<level>10</level>
    	</Entity>
      <Entity>
    		<id>2</id>
    		<fname>Jake</fname>
    		<lname>Fake</lname>
    		<description>Faker</description>
    		<level>20</level>
    	</Entity>
      <Entity>
    		<id>3</id>
    		<fname>Kirk</fname>
    		<lname>Dirk</lname>
    		<description>Tester</description>
    		<level>30</level>
    	</Entity>
    </Entities>

Similar Threads

  1. Uncaught TypeError: Cannot call method 'indexOf' of undefined
    By cwebb in forum Sencha Touch 1.x: Discussion
    Replies: 11
    Last Post: 9 Sep 2010, 6:59 PM
  2. Uncaught TypeError (JsonStore)
    By Johnnyger in forum Sencha Touch 1.x: Discussion
    Replies: 4
    Last Post: 2 Sep 2010, 1:12 AM
  3. Replies: 1
    Last Post: 18 Jun 2010, 12:54 AM
  4. uncaught exception: Permission denied to call method XMLHttpRequest.open
    By blackperl in forum Ext 2.x: Help & Discussion
    Replies: 4
    Last Post: 26 Feb 2009, 6:16 AM
  5. uncaught exception: Permission denied to call method XMLHttpRequest.open
    By lalit_ce in forum Ext 2.x: Help & Discussion
    Replies: 1
    Last Post: 13 Jan 2009, 2:05 AM

Thread Participants: 3

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..." hd porno faketaxi