1. #1
    Sencha User ThorstenSuckow's Avatar
    Join Date
    Sep 2007
    Location
    Aachen, Germany
    Posts
    597
    Vote Rating
    2
    ThorstenSuckow is on a distinguished road

      0  

    Default [2.2][CLOSED] Bug in Ext.Panel.onRender

    [2.2][CLOSED] Bug in Ext.Panel.onRender


    Line 687 - 693:

    Code:
            if(this.tools){
                var ts = this.tools;
                this.tools = {};
                this.addTool.apply(this, ts);
            }else{
                this.tools = {};
            }
    Notice the line

    Code:
    this.addTool.apply(this, ts);
    Obviously, Function.prototype.apply expects the second argument to be of type Array, but instead an object is passed, which will throw an error.

    Changing the line

    Code:
    this.addTool.apply(this, ts);
    to

    Code:
    this.addTool.apply(this, [ts]);
    Will fix this issue.


    HTHATINCW

    Thorsten

  2. #2
    Sencha - Community Support Team Condor's Avatar
    Join Date
    Mar 2007
    Location
    The Netherlands
    Posts
    24,246
    Vote Rating
    89
    Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of

      0  

    Default


    The API docs clearly state that the tools config option needs to be an Array (hence the plural: tools)!

  3. #3
    Sencha User ThorstenSuckow's Avatar
    Join Date
    Sep 2007
    Location
    Aachen, Germany
    Posts
    597
    Vote Rating
    2
    ThorstenSuckow is on a distinguished road

      0  

    Default


    Quote Originally Posted by Condor View Post
    The API docs clearly state the the tools config option needs to be an Array (hence the plural: tools)!
    Yeah that was pretty stupid, this seems to be an error in our config.

    Please burn this post!

    Thanks!

  4. #4
    Sencha User
    Join Date
    Mar 2011
    Posts
    1
    Vote Rating
    0
    Conrad Herrmann is on a distinguished road

      0  

    Default No, really there is a bug in here

    No, really there is a bug in here


    I've been chasing down a problem in ExtJS 3.3.1, and it appears to be the same as the one reported here, except that it's the other half of the if statement.

    In ExtJS 3.3.1, the code looks like this:
    Code:
           
            if(this.tools){
                ts = this.tools;
                this.elements += (this.header !== false) ? ',header' : '';
            }
            this.tools = {};
    If you start with this.tools==undefined, then after the onRender code executes, this.tools will be equal to {}. If you ever need to re-render the object again (for example, if you change the contents of the panel, or even change its layout manager) then this.tools will be an illegal value!

    Note that setting the config option for tools to "[]" doesn't help, because we are really talking about a panel that doesn't have a toolbar.

    I'll keep looking to see if there is another discussion of this issue, but in the meantime, I thought it would be useful to append to this one.

Thread Participants: 2

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