Results 1 to 5 of 5

Thread: config property is not applied

  1. #1
    Sencha Premium Member
    Join Date
    Jul 2010
    Posts
    9
    Vote Rating
    0
      0  

    Default config property is not applied

    Hi,

    I have this code:
    Code:
    Ext.define('app.component.window.D3', {
        extend: 'app.component.window.Window',
        config:{
        	title:'D3 window'	
        }
    });
    
    
    
    Ext.application({    name: 'appt',
        appFolder:'app',
        launch: function() {
            var win = Ext.create('app.component.window.D3', {
                layout: 'fit'
            });
            
            win.show();
            
        }
    });
    The code is splitted in the right directory, the window is displayed but the title is not set. It gets set only if i put

    Code:
    win.getTitle();
    after win.show(). Why is there this behaviour? I was thinking that It was setting a default value using config.

    Thanks

  2. #2
    Sencha Premium Member vadimv's Avatar
    Join Date
    Sep 2010
    Location
    Cluj, Romania
    Posts
    722
    Vote Rating
    52
      0  

    Default

    Class configs should not coincide with optional configs specified in config object, and the ones like "title" have by default accessor methods
    Github https://github.com/vadimpopa
    Sencha tips and articles : http://vadimpopa.com
    Twitter: @vadimvpopa

  3. #3
    Sencha Premium Member
    Join Date
    Jul 2010
    Posts
    9
    Vote Rating
    0
      0  

    Default

    If it's so why in the examples they use title in config?

    Look at http://dev.sencha.com/deploy/ext-4.1...e/class_system 2. Configuration section

  4. #4
    Sencha Premium Member vadimv's Avatar
    Join Date
    Sep 2010
    Location
    Cluj, Romania
    Posts
    722
    Vote Rating
    52
      0  

    Default

    , they define there a class, they don't extend a extjs window class like you do.
    Github https://github.com/vadimpopa
    Sencha tips and articles : http://vadimpopa.com
    Twitter: @vadimvpopa

  5. #5
    Sencha Premium Member vadimv's Avatar
    Join Date
    Sep 2010
    Location
    Cluj, Romania
    Posts
    722
    Vote Rating
    52
      0  

    Default

    if you need to do that, then..... go and study extjs documentation
    Github https://github.com/vadimpopa
    Sencha tips and articles : http://vadimpopa.com
    Twitter: @vadimvpopa

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
  •