Results 1 to 2 of 2

Thread: When to use config: ? (layout not working)

  1. #1
    Sencha Premium Member
    Join Date
    Jul 2012
    Posts
    114
    Answers
    5
    Vote Rating
    7
      0  

    Question When to use config: ? (layout not working)

    I have seen config: used here and there, and decided to start using it to see what it actually does. I thought it was just to separate new properties and existing properties within a Ext.define, however certain things seem to get messed up when I use it like that. Here is an example:

    Code:
     Ext.define('appName.view.vViewport', { 
      extend: 'Ext.container.Viewport',
    
      config: {
        layout: 'border',
        items: [
          {
            region: 'center',
            xtype: 'panel'
          },
          {
            region: 'south',
            xtype: 'panel'
          }
        ]
      },
    
    
      initComponent: function () {
        var me = this;
        me.callParent();
        clog('vViewport.initComponent()');
      }
    
    
    });
    with layout inside the config, it appears to use auto (not border), with layout outside the config it works as expected. Can someone give me a brief explanation of config: or at least point me to detailed documentation on it's use. Thanks.

  2. #2
    Sencha User
    Join Date
    Sep 2011
    Posts
    574
    Answers
    59
    Vote Rating
    74
      0  

    Default

    It is most used in Touch, not ExtJS.
    However, for my opinion, it is rather limited, because it doesn't allow to override not "configurable" properties and/or methods.

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
  •