Results 1 to 5 of 5

Thread: Unresolved reference in TreeFilter

  1. #1
    Ext User
    Join Date
    Jun 2007
    Posts
    15
    Vote Rating
    0
      0  

    Default Unresolved reference in TreeFilter

    extjs 1.0.1a
    windows xp
    firefox 2.0.0.4

    error:
    this.clearFilter is not a function ext-all-debug.js line 18540

    This error can come up when using a TreeFilter with either autoClear or clearBlank set to true.

    A look at the code shows that TreeFilter has no clearFilter function but does have a function called clear. aliasing clear to clearFilter fixes things.

    Code:
       //added
        clearFilter : function(){
            this.clear();
        },
        clear : function(){
            var t = this.tree;
            var af = this.filtered;
            for(var id in af){
                if(typeof id != "function"){
                    var n = af[id];
                    if(n){
                        n.ui.show();
                    }
                }
            }
            this.filtered = {}; 
        }

  2. #2
    Sencha User mystix's Avatar
    Join Date
    Mar 2007
    Location
    Singapore
    Posts
    6,236
    Vote Rating
    5
      0  

    Default

    @rewand, thanks for reporting this.

    jack / brian, this is also missing in 1.1 RC1.

  3. #3
    Sencha User mystix's Avatar
    Join Date
    Mar 2007
    Location
    Singapore
    Posts
    6,236
    Vote Rating
    5
      0  

    Default

    in the meantime, instead of messing directly with ext-all-debug.js / ext-all.js, just include this code block in your overrides file
    Code:
    Ext.override(Ext.tree.TreeFilter, {
      clearFilter: this.clear
    });
    and it should take care of the problem.

  4. #4
    Ext User
    Join Date
    Jun 2007
    Posts
    15
    Vote Rating
    0
      0  

    Default

    Quote Originally Posted by mystix View Post
    in the meantime, instead of messing directly with ext-all-debug.js / ext-all.js, just include this code block in your overrides file
    Code:
    Ext.override(Ext.tree.TreeFilter, {
      clearFilter: this.clear
    });
    and it should take care of the problem.
    Good suggestion. I try to override/inherit as little as possible so as to avoid maint problems but in this case it's a decent best work around.

    BTW I checked the 1.1 rc1 download and it has the same bug

    Thanks

  5. #5
    Sencha User jack.slocum's Avatar
    Join Date
    Mar 2007
    Location
    New York, NY
    Posts
    6,956
    Vote Rating
    20
      0  

    Default

    Thanks. Fixed.
    Jack Slocum
    Sencha Co-Founder, Ext JS Founder
    Original author of Ext JS 1, 2 & 3.
    Twitter: @jackslocum

Posting Permissions

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