1. #1
    Sencha User
    Join Date
    Oct 2011
    Posts
    30
    Vote Rating
    0
    pm.sreejith is on a distinguished road

      0  

    Question Error occuring while removing items from carousel component!!!

    Error occuring while removing items from carousel component!!!


    Hi All,

    While removing all items from carousel component using the function removeAll(), and trying to add items using the function setItems(). That time I'm getting an error as follows,

    Uncaught TypeError: Cannot call method 'createChild' of null

    Code:
    articleCatWise = this.getArticleCategoryWiseStore();
            articleCatWise.removeAll();
            articleCatWise.clearFilter();
            articleCatWise.filter([{
                property: 'catId',
                value: iCatId
            }]);
    
            articleCatWise.load({
                scope   : this,
                callback: function(records, operation, success) {
                    
                    var arrArticleItems = new Array();
                    var carouselItems = new Array();
                    var carouselSubItems = new Array();
                    var iCnt = 0;
                    
                    //arrArticleItems.push({});
                    
                    //the operation object contains all of the details of the load operation
                    articleCatWise.each(function(rec){
                        
                        carouselSubItems = new Array(rec.get('articleid'),rec.get('articletitle'),rec.get('articledate'),rec.get('articleshortdesc'),rec.get('articleimg'));
                        carouselItems.push(carouselSubItems);
                        iCnt++;                    
                        
                    });
                    
                    var iarrLen = iCnt;
                    var iMLp = 1;
                    var iSubLp = 1;
                    iCnt = 0;
                    
                    if(iarrLen > 0){
                        
                        for(iLp = 0; iLp < iarrLen; iLp++){
                            
                            var articleItems1 = new Array();
                            var articleItems2 = new Array();
                            
                            if(iMLp == 1){
    
                                if(carouselItems[iLp] != undefined){
                                    articleItems1.push({
                                        html: '<div><div><img src="'+ carouselItems[iLp][4] +'" border="0" /></div><div>'+  carouselItems[iLp][2] +'<br/>'+  carouselItems[iLp][1] +'<br/>'+  carouselItems[iLp][3] +'</div></div>',
                                        flex: 1                                    
                                    });
                                }
                                
                                if(carouselItems[iLp+1] != undefined){
                                    articleItems2.push({
                                        html: '<div><div><img src="'+ carouselItems[iLp+1][4] +'" border="0" /></div><div>'+  carouselItems[iLp+1][2] +'<br/>'+  carouselItems[iLp+1][1] +'<br/>'+  carouselItems[iLp+1][3] +'</div></div>',
                                        flex: 1
                                    });
                                }
                                
                                if(carouselItems[iLp+2] != undefined){
                                    articleItems2.push({
                                        html: '<div><div><img src="'+ carouselItems[iLp+2][4] +'" border="0" /></div><div>'+  carouselItems[iLp+2][2] +'<br/>'+  carouselItems[iLp+2][1] +'<br/>'+  carouselItems[iLp+2][3] +'</div></div>',
                                        flex: 1
                                    });
                                }
                                
                                if(carouselItems[iLp+3] != undefined){
                                    articleItems2.push({
                                        html: '<div><div><img src="'+ carouselItems[iLp+3][4] +'" border="0" /></div><div>'+  carouselItems[iLp+3][2] +'<br/>'+  carouselItems[iLp+3][1] +'<br/>'+  carouselItems[iLp+3][3] +'</div></div>',
                                        flex: 1
                                    });
                                }
                                
                                arrArticleItems.push({
                                    xtype: 'container',
                                    layout: {
                                        type: 'hbox'
                                    },
                                    items: [
                                    {
                                        html: '<div><div style="border:1px solid red;"><img src="'+ carouselItems[iLp][4] +'" border="0" /></div><div>'+  carouselItems[iLp][2] +'<br/>'+  carouselItems[iLp][1] +'<br/>'+  carouselItems[iLp][3] +'</div></div>',
                                        flex: 1
                                    },
                                    {
                                        xtype: 'container',
                                        layout: {
                                            type: 'vbox'
                                        },
                                        items: articleItems2
                                    }
                                    ]
                                });
                                
                                iLp = iLp + 3;
                                
                            }
                            else{
    
                                //First Array
                                if(carouselItems[iLp] != undefined){
                                    articleItems1.push({
                                        html: '<div><div><img src="'+ carouselItems[iLp][4] +'" border="0" /></div><div>'+  carouselItems[iLp][2] +'<br/>'+  carouselItems[iLp][1] +'<br/>'+  carouselItems[iLp][3] +'</div></div>',
                                        flex: 1
                                    });
                                }
                                
                                if(carouselItems[iLp+1] != undefined){
                                    articleItems1.push({
                                        html: '<div><div><img src="'+ carouselItems[iLp+1][4] +'" border="0" /></div><div>'+  carouselItems[iLp+1][2] +'<br/>'+  carouselItems[iLp+1][1] +'<br/>'+  carouselItems[iLp+1][3] +'</div></div>',
                                        flex: 1
                                    });
                                }
                                
                                if(carouselItems[iLp+2] != undefined){
                                    articleItems1.push({
                                        html: '<div><div><img src="'+ carouselItems[iLp+2][4] +'" border="0" /></div><div>'+  carouselItems[iLp+2][2] +'<br/>'+  carouselItems[iLp+2][1] +'<br/>'+  carouselItems[iLp+2][3] +'</div></div>',
                                        flex: 1
                                    });
                                }
                                
                                
                                //Second Array
                                if(carouselItems[iLp+3] != undefined){
                                    articleItems2.push({
                                        html: '<div><div><img src="'+ carouselItems[iLp+3][4] +'" border="0" /></div><div>'+  carouselItems[iLp+3][2] +'<br/>'+  carouselItems[iLp+3][1] +'<br/>'+  carouselItems[iLp+3][3] +'</div></div>',
                                        flex: 1
                                    });
                                }
                                
                                if(carouselItems[iLp+4] != undefined){
                                    articleItems2.push({
                                        html: '<div><div><img src="'+ carouselItems[iLp+4][4] +'" border="0" /></div><div>'+  carouselItems[iLp+4][2] +'<br/>'+  carouselItems[iLp+4][1] +'<br/>'+  carouselItems[iLp+4][3] +'</div></div>',
                                        flex: 1
                                    });
                                }
                                
                                if(carouselItems[iLp+5] != undefined){
                                    articleItems2.push({
                                        html: '<div><div><img src="'+ carouselItems[iLp+5][4] +'" border="0" /></div><div>'+  carouselItems[iLp+5][2] +'<br/>'+  carouselItems[iLp+5][1] +'<br/>'+  carouselItems[iLp+5][3] +'</div></div>',
                                        flex: 1
                                    });
                                }
                                
    
                                arrArticleItems.push({
                                    
                                    xtype: 'container',
                                    layout: {
                                        type: 'hbox'
                                    },
                            
                                    items: [
                                    {
                                        xtype: 'container',
                                        layout: {
                                            type: 'vbox'
                                        },
                                        items: articleItems1
                                    },
                                    {
                                        xtype: 'container',
                                        layout: {
                                            type: 'vbox'
                                        },
                                        items: articleItems2
                                    }
                                    ]                                
                                    
                                });
                                
                                iLp = iLp + 5;
                            }
                            
                            iMLp++;
                        }
                        
                        this.getContentCarousel().removeAll();
                        this.getContentCarousel().setItems(arrArticleItems);
                        
                    }
                    
                }
            });
    I'm using sencha touch 2.0 pr2 version with MVC pattern.
    Please go through the code and let me know.

    Any help would be greatly appreciated...

  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    36,754
    Vote Rating
    827
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      0  

    Default


    This is a bug and is known.
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!

    When posting code, please use BBCode's CODE tags.

  3. #3
    Sencha User
    Join Date
    Dec 2011
    Posts
    14
    Vote Rating
    0
    Sewdn is on a distinguished road

      0  

    Default


    Any idea when this bug wil be fixed?

    thanks!
    Pieter

  4. #4
    Sencha User
    Join Date
    Apr 2012
    Posts
    23
    Vote Rating
    5
    jamezilla is on a distinguished road

      0  

    Default bug status?

    bug status?


    I'm still seeing this bug in 2.0.1rc. Is there a way to monitor bugs? Bug tracker somewhere? If so, what's the bug #?

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