Threaded View

  1. #1
    Sencha User
    Join Date
    Jun 2010
    Posts
    139
    Vote Rating
    3
    jeanluca is on a distinguished road

      0  

    Default Answered: problem with requiring files

    Answered: problem with requiring files


    Hello

    When I run my app I get warnings like

    Code:
    [WARN][Anonymous] [Ext.Loader] Synchronously loading 'NS.view.template.SearchListItem'; consider adding NS.view.template.SearchListItem' explicitly as a require of the corresponding class
    Here is how I've used the SearchListItem:

    Code:
    Ext.define('NS.view.ItemList',
    {
        extend: 'Ext.dataview.List',
    
        requires: [ 'NS.view.template.SearchListItem'],
    
        config:
        {
            itemTpl: Ext.create('NS.view.template.SearchListItem'),
            ......
        }
    });
    The warning is only gone when I require the SearchListItem in app.js

    Any suggestions ?

    Cheers

  2. Code:
    Ext.define('NS.view.ItemList',
    {
        extend: 'Ext.dataview.List',
    
        requires: [ 'NS.view.template.SearchListItem'],
    
        config:
        {
            itemTpl: Ext.create('NS.view.template.SearchListItem'),
            ......
        }
    });
    Code in red is invalid, you should not create an instance on a config like that, only create instances within methods like (typing off top of my head):

    Code:
    Ext.define('NS.view.ItemList',
    {
        extend: 'Ext.dataview.List',
    
        requires: [ 'NS.view.template.SearchListItem'],
    
        config:
        {
            itemTpl: true,
            ......
        },
    
        applyItemTpl : function(tpl, oldTpl) {
            if (tpl === true) {
                tpl = Ext.create('NS.view.template.SearchListItem');
            }
    
            return this.callParent([tpl, oldTpl]);
        }
    });

Thread Participants: 1

Tags for this Thread

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