1. #1
    Sencha User
    Join Date
    Oct 2007
    Posts
    40
    Answers
    1
    Vote Rating
    0
    bsklar is on a distinguished road

      0  

    Default Answered: getDetailCard works with sencha-touch-all-compat but not with sencha-touch-all-debug

    Answered: getDetailCard works with sencha-touch-all-compat but not with sencha-touch-all-debug


    I cannot figure out why the following code is working fine, that is it showing the detailCard with sencha-touch-all-compat.js but it does not work with sencha-touch-all-debug.js. I am using sencha-touch-2-b3.

    Code:
     	var petNL =  Ext.create('Ext.dataview.NestedList', {
                    iconCls: 'dog_icon',
    				xtype: 'nestedlist',
                                    title  : 'Available Dogs',
    				store: store,
    			    getItemTextTpl: function() {
    					return listfmt;
    				},
    			    getDetailCard: function(node) {
    				  if (node) {
    						return {
    							xtype: 'panel',
    							scrollable: true,
    							styleHtmlContent: true,
    							fullscreen: true,
    						    items:{
    								  docked : 'top',
    								  xtype: 'toolbar',
    								  title: node.get('name'),
    								  },							
    							html:  
    								'<img src="' + node.get('avatar') + '" width="310" height="310" >' 
                                                                    + 'Age:</strong> ' + node.get('age') + '<br/>' 
    						}
    				  }
    			  }
    			});
    Thank you in advance for your assistance.

  2. Code:
    Ext.define('my.DogList', {
        extend: 'Ext.dataview.NestedList',
        xtype: 'doglist',
        config: {
            iconCls:'dog_icon',
            title:'Available Dogs'
        },
        getDetailCard:function (node) {
            if (node) {
                return {
                    xtype:'panel',
                    scrollable:true,
                    styleHtmlContent:true,
                    fullscreen:true,
                    items:{
                        docked:'top',
                        xtype:'toolbar',
                        title:node.get('name'),
                    },
                    html:'<img src="' + node.get('avatar') + '" width="310" height="310" >'
                        + 'Age:</strong> ' + node.get('age') + '<br/>'
                }
            }
        }
    });
    
    var petNL = Ext.create('my.DogList', {
        getItemTextTpl:function () {
            return listfmt;
        },
        store: store
    });
    I'm not sure what listfmt is since it's defined somewhere else in your closure.. Otherwise I'd put it in the new class as well.

  3. #2
    Sencha - Sencha Touch Dev Team Jamie Avins's Avatar
    Join Date
    Mar 2007
    Location
    Redwood City, California
    Posts
    3,661
    Answers
    17
    Vote Rating
    20
    Jamie Avins is a jewel in the rough Jamie Avins is a jewel in the rough Jamie Avins is a jewel in the rough

      0  

    Default


    There is no config for getDetailCard, only one for detailCard. If you want to override the method like this, you cannot pass it in as a config. You should extend the class.

    Sencha Inc

    Jamie Avins

    @jamieavins

  4. #3
    Sencha User
    Join Date
    Oct 2007
    Posts
    40
    Answers
    1
    Vote Rating
    0
    bsklar is on a distinguished road

      0  

    Default


    Jamie,

    Thanks for the reply but I'm not sure I understand. Can you please provide an example? Thank You.

  5. #4
    Sencha - Sencha Touch Dev Team Jamie Avins's Avatar
    Join Date
    Mar 2007
    Location
    Redwood City, California
    Posts
    3,661
    Answers
    17
    Vote Rating
    20
    Jamie Avins is a jewel in the rough Jamie Avins is a jewel in the rough Jamie Avins is a jewel in the rough

      0  

    Default


    Code:
    Ext.define('my.DogList', {
        extend: 'Ext.dataview.NestedList',
        xtype: 'doglist',
        config: {
            iconCls:'dog_icon',
            title:'Available Dogs'
        },
        getDetailCard:function (node) {
            if (node) {
                return {
                    xtype:'panel',
                    scrollable:true,
                    styleHtmlContent:true,
                    fullscreen:true,
                    items:{
                        docked:'top',
                        xtype:'toolbar',
                        title:node.get('name'),
                    },
                    html:'<img src="' + node.get('avatar') + '" width="310" height="310" >'
                        + 'Age:</strong> ' + node.get('age') + '<br/>'
                }
            }
        }
    });
    
    var petNL = Ext.create('my.DogList', {
        getItemTextTpl:function () {
            return listfmt;
        },
        store: store
    });
    I'm not sure what listfmt is since it's defined somewhere else in your closure.. Otherwise I'd put it in the new class as well.

    Sencha Inc

    Jamie Avins

    @jamieavins

  6. #5
    Sencha User
    Join Date
    Oct 2007
    Posts
    40
    Answers
    1
    Vote Rating
    0
    bsklar is on a distinguished road

      0  

    Default Solved

    Solved


    Jamie,

    Got it, thank you so very much, Secha Touch is awesome.
    The running code is at http://www.vgsr.org/mobile/index.html.

Thread Participants: 1

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..."