Gelmiş geçmiş en büyük porno sitemiz olan 2pe de her zaman en kaliteli pornoları sunmayı hedefledik. Diğer video sitemiz olan vuam da ise hd porno ağırlıklı çalışmalara başladık.

  1. #1
    Ext User
    Join Date
    Mar 2007
    Posts
    59
    Vote Rating
    0
    gcsolaroli is on a distinguished road

      0  

    Default minor YAHOO.ext.CompositeElementLite code weirdness

    minor YAHOO.ext.CompositeElementLite code weirdness


    Digging on the ComponentElement.js file, I found some other code that didn't look perfectly sound

    Code:
    YAHOO.ext.CompositeElementLite = function(els){
        this.elements = [];
        this.addElements(els);
        this.el = YAHOO.ext.Element.get(this.elements[0], true);
    };
    There is nothing wrong with this constructor, but I think it would be more correct to write it like this, wouldn't it?
    Code:
    YAHOO.ext.CompositeElementLite = function(els){
        YAHOO.ext.CompositeElementLite.superclass.constructor.call(this, els);
        this.el = YAHOO.ext.Element.get(this.elements[0], true);
    };

    There is also a subtle inconsistency in the YAHOO.ext.CompositeElementLite.addElements implementation.
    Code:
    YAHOO.ext.CompositeElementLite
    addElements : function(els){
        if(!els) return this;
        this.elements = this.elements.concat(els);
    },
    This code does not return anything when some elements are passed, whereas in all other condition (even in the YAHOO.ext.CompositeElement.addElement) 'this' is always returned.

    This could be easily fixed:
    Code:
    YAHOO.ext.CompositeElementLite
    addElements : function(els){
        if (els) {
            this.elements.concat(els);
        }
        return this
    },

  2. #2
    Sencha User jack.slocum's Avatar
    Join Date
    Mar 2007
    Location
    Tampa, FL
    Posts
    6,955
    Vote Rating
    16
    jack.slocum will become famous soon enough

      0  

    Default


    There used to be a reason the parent's constructor was not called. That code was removed and the code in Lite was never changed.

    I went through and added return this; as an after thought. I must have missed a spot. Thanks.

    FYI, this code wouldn't work, concat does not modify the original array.

    addElements : function(els){
    if (els) {
    this.elements.concat(els);
    }
    return this
    }

  3. #3
    Ext User
    Join Date
    Mar 2007
    Posts
    59
    Vote Rating
    0
    gcsolaroli is on a distinguished road

      0  

    Default


    FYI, this code wouldn't work, concat does not modify the original array.

    Thanks for you correction.

    I just quickly looked for an online example on how to use concat on an array, as I was not sure if it was modifying the original or not, but I have misunderstood how to use it.

  4. #4
    Sencha User jack.slocum's Avatar
    Join Date
    Mar 2007
    Location
    Tampa, FL
    Posts
    6,955
    Vote Rating
    16
    jack.slocum will become famous soon enough

      0  

    Default


    No, thank you for pointing these things out. Right now is the time to correct the weirdness.

Similar Threads

  1. Toolbar buttons, CSS, mouseover weirdness
    By dbadke in forum Ext 2.x: Help & Discussion
    Replies: 2
    Last Post: 6 Mar 2007, 8:34 AM
  2. Is CompositeElementLite working as expected
    By gordon in forum Ext 2.x: Help & Discussion
    Replies: 2
    Last Post: 28 Feb 2007, 8:54 AM
  3. IE 6 scrollbar weirdness
    By BernardChhun in forum Ext 1.x: Help & Discussion
    Replies: 0
    Last Post: 15 Feb 2007, 7:20 AM
  4. Selector weirdness
    By TommyMaintz in forum Ext 1.x: Bugs
    Replies: 1
    Last Post: 24 Jan 2007, 7:22 AM
  5. getEl() weirdness...
    By rob30UK in forum Ext 1.x: Help & Discussion
    Replies: 5
    Last Post: 17 Jan 2007, 1:45 AM

Thread Participants: 1