Results 1 to 3 of 3

Thread: [4.1 B1] CSS.createStyleSheet() error

    Success! Looks like we've fixed this one. According to our records the fix was applied for EXTJS-4964 in a recent build.
  1. #1
    Sencha - Documentation Team slemmon's Avatar
    Join Date
    Mar 2009
    Location
    Boise, ID
    Posts
    6,162
    Vote Rating
    257
      0  

    Default [4.1 B1] CSS.createStyleSheet() error

    REQUIRED INFORMATION Ext version tested:
    • Ext 4.1 rev Beta 1

    Browser versions tested against:
    • IE8
    • FF5 (firebug 1.8.3)

    DOCTYPE tested against:
    • strict

    Description:
    • If a class is defined and then instantiated in an app's viewport with Ext.util.CSS.createStyleSheet() executed either before the app is instantiated or in the custom class definition an error occurs: in Firebug - Ext.util.CSS.getRule("." + Ext.baseCSSPrefix + "form-trigger") is undefined. Tested on intranet web server + remote web server as well as from file system.

    Steps to reproduce the problem:
    • Define a class to be instantiated in the viewport
    • Create an application.
    • In the launch() execute Ext.util.CSS.createStyleSheet('.style{color:red;}','stylesheet_id')
    • Then create a viewport using the class you defined just before in the viewport.

    The result that was expected:
    • Viewport should be created with no errors.

    The result that occurs instead:
    • App creation halts with error: Ext.util.CSS.getRule("." + Ext.baseCSSPrefix + "form-trigger") is undefined

    Test Case:
    Code:
     Ext.define('Sample.view.Panel', {
                extend: 'Ext.panel.Panel'
                , alias: 'widget.mypanel'
    
                , title: 'My Panel'
                , dockedItems: [{
                    xtype: 'toolbar'
                    , dock: 'top'
                    , items: [{
                        xtype: 'triggerfield'
                    }]
                }]
            })
    
            Ext.application({
                name: 'Sample'
                , appFolder: 'app'
                //, requires: ['Sample.view.Panel']
                , launch: function () {
                    Ext.util.CSS.createStyleSheet('.sample{color:black;}', 'sample-css')
    
                    var vp = Ext.widget('viewport', {
                        layout: 'border'
                        , items: [{
                            xtype: 'mypanel'
                            , region: 'center'
                        }]
                    })
                }
            })
    HELPFUL INFORMATION Screenshot or Video:
    • n/a

    See this URL for live test case: n/a Debugging already done:
    • none

    Possible fix:
    • not provided

    Additional CSS used:
    • only default ext-all.css

    Operating System:
    • WinXP Pro

  2. #2
    Sencha - Sr Software Engineer mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    39,556
    Vote Rating
    1272
      0  

    Default

    Thank you for the report. This will be included in the next release.
    Mitchell Simoens @LikelyMitch
    Sencha Inc, Senior Software Engineer
    ________________
    Learn BBCode and use it! Checkout the CODE tag!

    Check out my GitHub, lots of nice things for Ext JS and Sencha Touch
    https://github.com/mitchellsimoens

  3. #3
    Ext JS Premium Member
    Join Date
    Mar 2008
    Location
    Phoenix, AZ
    Posts
    646
    Vote Rating
    12
      0  

    Default

    Any patch?

Posting Permissions

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