1. #1
    Sencha User
    Join Date
    Mar 2010
    Posts
    249
    Vote Rating
    1
    Ex_Soft is an unknown quantity at this point

      0  

    Default [4.2.0beta] Ext.util.CSS.getRule() error

    [4.2.0beta] Ext.util.CSS.getRule() error


    Code:
    //Ext.util.CSS.refreshCache();
    Ext.util.CSS.getRule(".x-body");
    TypeError: rules is null
    Code:
            getRule: function(selector, refreshCache, rawCache) {
                var i;
    
                if (refreshCache) {
                    CSS.refreshCache();
                }
                if (!Ext.isArray(selector)) {
                    return rawCache ? rules[selector.toLowerCase()] : rules[selector.toLowerCase()].cssRule;
                }
                for (i = 0; i < selector.length; i++) {
                    if (rules[selector[i]]) {
                        return rawCache ? rules[selector[i].toLowerCase()] : rules[selector[i].toLowerCase()].cssRule;
                    }
                }
                return null;
            },

  2. #2
    Sencha Premium Member skirtle's Avatar
    Join Date
    Oct 2010
    Location
    UK
    Posts
    3,593
    Vote Rating
    324
    skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future

      0  

  3. #3
    Sencha User
    Join Date
    Mar 2010
    Posts
    249
    Vote Rating
    1
    Ex_Soft is an unknown quantity at this point

      0  

    Default


    Quote Originally Posted by skirtle View Post
    Yes. But I didn't edit sources of ExtJS and called Ext.util.CSS.refreshCache() directly at start of application.

  4. #4
    Sencha - Ext JS Dev Team evant's Avatar
    Join Date
    Apr 2007
    Location
    Sydney, Australia
    Posts
    16,915
    Vote Rating
    630
    evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute

      0  

    Default


    Is it called inside an onReady block? Please post a test case.
    Evan Trimboli
    Sencha Developer
    Twitter - @evantrimboli
    Don't be afraid of the source code!

  5. #5
    Sencha User
    Join Date
    Mar 2010
    Posts
    249
    Vote Rating
    1
    Ex_Soft is an unknown quantity at this point

      0  

    Default


    Quote Originally Posted by evant View Post
    Please post a test case.
    Code:
    Ext.onReady(function() {
        var
            rule = Ext.util.CSS.getRule(".x-body");
    });

  6. #6
    Sencha - Ext JS Dev Team evant's Avatar
    Join Date
    Apr 2007
    Location
    Sydney, Australia
    Posts
    16,915
    Vote Rating
    630
    evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute

      0  

    Default


    As @skirtle said, it's the same bug he linked, will be fixed in the next beta refresh.
    Evan Trimboli
    Sencha Developer
    Twitter - @evantrimboli
    Don't be afraid of the source code!

Thread Participants: 2