Results 1 to 3 of 3

Thread: [E] Cannot override method statics on Ext.util.FilterCollection instance.

    You found a bug! We've classified it as EXTJS-20558 . We encourage you to continue the discussion and to find an acceptable workaround while we work on a permanent fix.
  1. #1

    Default [E] Cannot override method statics on Ext.util.FilterCollection instance.

    Ext version tested:

    • Ext 6.0.0 (GPL)
    • 5.0.0.736 in Fiddle

    Browser versions tested against:
    • Firefox 44.0.2
    • Chrome 48.0.2564.109

    Description:

    When setting filters from a FilterCollection to a Store, console shows the error: "[E] Cannot override method statics on Ext.util.FilterCollection instance."

    Diving into the framework code, I suspect the problem is in Ext.isIterable(ret) when called from decodeItems(): FilterCollection is not iterable (but should be), and inside "isIterable()", the special check with regexp iterableRe = /\[object\s*(?:Array|Arguments|\w*Collection|\w*List|HTML\s+document\.all\s+class)\]/ against FilterCollection fails because value.toString() returns "[object Object]" instead of an expected "[object FiterCollection]" (or alike).

    Two possible solutions I can think of:
    • Override in some way the Object.toString() (maybe in Base) and execute something like "value.prototype.toString()" and update the regexp, so #toString() returns the proper String.
    • Make FilterCollection truly iterable (don't know if this is possible). The console shows FilterCollection instances as arrays! but then they are not iterable...


    Maybe after solving this problem, they will appear other problems.


    Steps to reproduce the problem:

    https://fiddle.sencha.com/fiddle/15ui

    and the error "[E] Cannot override method statics on Ext.util.FilterCollection instance." will appear in the console.


    Workaround:

    Add each filter as a single value. For example, instead of:
    Code:
    myStore.setFilters(filters);
    do:
    Code:
    filters.each(
                function(filterItem) {
                    myStore.addFilter(filterItem);
                }
            );

  2. #2

    Default

    Thanks for the report! I have opened a bug in our bug tracker.

  3. #3
    Sencha Premium User NoahK17's Avatar
    Join Date
    Apr 2008
    Location
    Atlanta, GA
    Posts
    538

    Default

    This is still not fixed as of ExtJS 6.5.1 (May 2018)
    Noah
    Front-End Developer
    Norfolk Southern

Similar Threads

  1. [FIXED] Sencha Cmd Class Optimiser Removes statics() method
    By superstructor in forum Sencha Cmd
    Replies: 5
    Last Post: 5 Dec 2014, 5:12 PM
  2. [FIXED] FilterCollection find method is not working
    By spatel.engg in forum Ext 5: Bugs
    Replies: 1
    Last Post: 10 Oct 2014, 6:21 AM
  3. extracting all application label strings to util class statics?
    By gkatz in forum Sencha Touch 2.x: Discussion
    Replies: 1
    Last Post: 10 Jul 2014, 12:55 PM
  4. override statics
    By art.dev.ext in forum Ext: Q&A
    Replies: 2
    Last Post: 3 Apr 2013, 2:57 AM

Tags for this Thread

Posting Permissions

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