Threaded View

  1. #1
    Sencha User Dumas's Avatar
    Join Date
    Dec 2008
    Location
    Vienna, Austria
    Posts
    581
    Answers
    5
    Vote Rating
    9
    Dumas will become famous soon enough

      0  

    Default Answered: Class System: A mixin constructor

    Answered: Class System: A mixin constructor


    Hello,

    how can I have a mixin constructor to augment the class instance?

    This does not work:
    PHP Code:
    Ext.define('MyApp.mixin.Test', {
        
    extend'Ext.mixin.Mixin',
        
    constructor: function(config) {
            
    console.info('mixin constructor called');
            
    this.initConfig(config);
        }
    });

    Ext.define('MyApp.TestClass', {
        
    mixins: ['MyApp.mixin.Test'],
        
    constructor: function(config) {
            
    console.info('test class constructor called');
            
    this.initConfig(config);
        }
    });

    Ext.create('MyApp.TestClass'); 
    Thanks,
    Roland

  2. You have to call the mixin's constructor manually. It isn't automatic because there's no way for the class system to know when to call it.

    There's an example of this at the top of the docs for Observable:

    http://docs.sencha.com/ext-js/4-1/#!...til.Observable

Thread Participants: 1

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..." hd porno faketaxi