Results 1 to 2 of 2

Thread: How do you create a StatusBar?

  1. #1
    Sencha User
    Join Date
    Sep 2012
    Posts
    83

    Default How do you create a StatusBar?

    So I'm pretty new to ExtJS and am trying to create a toolbar. It seems like this should be a simple task. I'm using ExtJS 4.1.1.

    I have a skeleton HTML file:
    Code:
    <!DOCTYPE html>
    <html>
    <head>
        <link rel="stylesheet" type="text/css" href="lib/extjs/resources/css/ext-all-debug.css">
    </head>
    <body>
        <script src="lib/extjs/ext-debug.js"></script>
        <script src="app.js"></script>
    </body>
    </html>
    with a simple app.js:
    Code:
    Ext.Loader.setConfig({
        enabled:true
    });
    
    
    //Ext.Loader.setPath('Ext.ux', '../ux/');
    
    
    Ext.application(
        {
            name:'TestApp',
            appFolder:'app',
            autoCreateViewport:true
        });
    and then I have an app/view/Viewport.js as follows:
    Code:
    Ext.define('TestApp.view.Viewport', {
        extend:'Ext.Viewport',
        requires:[
    //        'Ext.ux.statusbar.StatusBar'
        ],
        layout:'border',
    
    
        initComponent:function ()
        {
            var me = this;
    
    
            Ext.applyIf(me, {
                items:[
                    {
                        xtype:'panel',
                        title:'Status Bar Test',
                        region:'center'
    //                    ,
    //                    bbar:{
    //                        xtype:'statusbar',
    //                        items:[
    //                            {
    //                                xtype:'tbtext',
    //                                text:'some text'
    //                            }
    //                        ]
    //                    }
                    }
                ]
            });
    
    
            me.callParent(arguments);
        }
    });
    This just displays an empty panel. If I uncomment just the lines in Viewport.js, I get the following:
    GET http://localhost:8081/test/lib/extjs/src/ux/statusbar/StatusBar.js?_dc=1348515241577 404 (Not Found)

    If I also uncomment the line in app.js (as suggested by http://dev.sencha.com/deploy/ext-4.1...tusbar-demo.js), this changes to:

    GET http://localhost:8081/ux//statusbar/...=1348515355144 404 (Not Found)

    So how exactly are you supposed to create a StatusBar (or anything within the Ext.ux namespace for that matter)? There's simply no src/ux folder in the 4.1.1 distribution. There's an examples/ux folder, but surely you're not supposed to just copy that into the src folder. (What about theme support for the StatusBar?)

  2. #2
    Sencha Premium User mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    40,379
    Answers
    3997

    Default

    It seems the path to Ext.ux is incorrect, you will need to fix it so that when you require the class it can be resolved correctly.
    Mitchell Simoens @LikelyMitch

    Check out my GitHub:
    https://github.com/mitchellsimoens

    Posts are my own, not any current, past or future employer's.

Posting Permissions

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