1. #1
    Sencha User
    Join Date
    Sep 2011
    Posts
    33
    Vote Rating
    0
    ultra2 is on a distinguished road

      0  

    Default Answered: Inherit from non Component class

    Answered: Inherit from non Component class


    I need to inherit from a non-Component class, in my case from TreeStore.
    I would like to handle events. No initComponent method to override, so that I suppose I need to
    override the constructor to wire up my event handlers.

    Can you give me a short sample? Is there any method I must call?
    Is this the right way?

    Code:
    constructor: function(config) {
      var me = this;
      me.callParent(arguments);
      me.on('move', this.MyMoveHandler);
    }
    Last edited by skirtle; 3 Dec 2011 at 4:59 PM. Reason: Added CODE tags

  2. The overall approach of overriding the constructor is fine. Generally in such circumstances I'd have a read of the superclass's source code to look for a better method to override but from a quick look I don't see a better one for what you're trying to do.

  3. #2
    Sencha Premium Member skirtle's Avatar
    Join Date
    Oct 2010
    Location
    UK
    Posts
    3,588
    Answers
    540
    Vote Rating
    322
    skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future

      0  

    Default


    The overall approach of overriding the constructor is fine. Generally in such circumstances I'd have a read of the superclass's source code to look for a better method to override but from a quick look I don't see a better one for what you're trying to do.

  4. #3
    Sencha User
    Join Date
    Sep 2011
    Posts
    33
    Vote Rating
    0
    ultra2 is on a distinguished road

      0  

    Default


    thanks!

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