Results 1 to 2 of 2

Thread: [2.0.1] Observable.addEvents does not add properties to the events object

  1. #1
    Sencha - Ext JS Dev Team Animal's Avatar
    Join Date
    Mar 2007
    Location
    Notts/Redwood City
    Posts
    30,615
    Vote Rating
    54
      0  

    Default [2.0.1] Observable.addEvents does not add properties to the events object

    The code does not handle being passed multiple string event names as parameters.

    The current code is:

    Code:
        addEvents : function(o){
            if(!this.events){
                this.events = {};
            }
            if(typeof o == 'string'){
                for(var i = 0, a = arguments, v; v = a[i]; i++){
                    if(!this.events[a[i]]){
                        o[a[i]] = true;
                    }
                }
            }else{
                Ext.applyIf(this.events, o);
            }
        },
    It should be

    Code:
        addEvents : function(o){
            if(!this.events){
                this.events = {};
            }
            if(typeof o == 'string'){
                for(var i = 0, a = arguments, v = o; v = a[i]; i++){
                    if(!this.events[v]){
                        this.events[v] = true;
                    }
                }
            }else{
                Ext.applyIf(this.events, o);
            }
        },

  2. #2
    Sencha - Community Support Team Condor's Avatar
    Join Date
    Mar 2007
    Location
    The Netherlands
    Posts
    24,246
    Vote Rating
    119
      0  

    Default DUP

    This has been reported before.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •