1. #1
    Sencha User
    Join Date
    Jul 2011
    Posts
    1
    Vote Rating
    0
    fafa89 is on a distinguished road

      0  

    Default Migration Ext JS 3 to Ext JS 4 : applyTo and add

    Migration Ext JS 3 to Ext JS 4 : applyTo and add


    Hello,
    I'm migrating a site from Ext JS 3 to 4 and I've got some trouble trying to do it cuz everytime that I try to add an item (normally a Panel) to another (with the add function) I get this error in my Console:

    [DEPRECATED][4.0][Ext.Component] applyTo (config): Use renderTo instead. Applying components to existing markup via "applyTo" is no longer supported.ext3-c...mpat.js (ligne 108)

    [INFO][4.0][Ext.Component] applyTo: This component will attempt to render to the applyTo target's parent node ("ext-gen1104"). If this did not work as expected then you will have to replace the applyTo config manually before this component will render properly.

    I've searched through all my code and I never use applyTo, though I've found that that message was displayed each and every time I use the add function, for example:

    var tP = new Ext.tab.Panel({
    deferredRender:false,
    plain:true,
    activeTab: 0
    });
    var i = 0;
    while (i < tabs.length){
    var list = new Array();
    var modules = tabs[i].value.split(',');
    var k = 0;
    var tempTab = new Ext.panel.Panel({
    title: tabs[i].attr.title,
    autoHeight: true
    });
    while (k < modules.length){
    var pName = modules[k]+'';
    var tmp = Ext.get(pName);
    tempTab.add(tmp);
    k++;
    }
    tP.add(tempTab);
    i++;
    }

    the array tabs is defined by a JSON object.

    Thanks 4 your help

  2. #2
    Sencha User
    Join Date
    Sep 2011
    Posts
    1
    Vote Rating
    0
    rstorres is on a distinguished road

      0  

    Default


    I am getting the exact same message and, the best I can determine at the moment is that I see this as an issue with the definition of the Ext.Component object, specifically, the constructor (the below excerpt is from ext-all-debug.js, starting at line 27225)

    constructor: function(config) {
    config = config || {};
    if (config.initialConfig) {



    if (config.isAction) {
    this.baseAction = config;
    }
    config = config.initialConfig;

    }
    else if (config.tagName || config.dom || Ext.isString(config)) {

    config = {
    applyTo: config,
    id: config.id || config
    };
    }


    this.callParent([config]);




    if (this.baseAction){
    this.baseAction.addComponent(this);
    }
    },

    If I replace the above applyTo with a renderTo, this notice goes away. So, a couple things. I'm by no means an Ext JS expert, but it certainly seems as if there is a bug in the 4.0.2a code. However, I'm curious to know if there is a significant possibility that this is an issue with our config parameters, or possibly the way we are instantiating our panel object...
    Any advice is appreciated. Thank you.

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