Results 1 to 4 of 4

Thread: mixin life cycle - need more docs

  1. #1
    Sencha User
    Join Date
    Nov 2010
    Posts
    444
    Vote Rating
    7
      0  

    Default mixin life cycle - need more docs

    the class system mixins tutorial is very dull. it does not state if the mixins have a constructor/initialize functions (I think they don't) even though they are defined as objects.
    the example in the docs are too plain and do not explain the subject in depth.
    thanks.

  2. #2
    Sencha - Sr Software Engineer mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    39,857
    Vote Rating
    1323
      0  

    Default

    A mixin isn't really created. Ext.Base takes the prototype of the mixins and merges it onto the class you are using it on. If there is a method/property on the mixin that is already on the class, the item on the mixin will not be merged on the class so if you have a constructor method on the mixin it won't overwrite the one on the class.

    So the methods are then available to the scope of the class or you can execute the methods on the mixin itself via this.mixins.mixinname.method.call(this);
    Mitchell Simoens @LikelyMitch
    Sencha Inc, Senior Software Engineer
    ________________
    Learn BBCode and use it! Checkout the CODE tag!

    Check out my GitHub, lots of nice things for Ext JS and Sencha Touch
    https://github.com/mitchellsimoens

  3. #3
    Sencha User
    Join Date
    Nov 2010
    Posts
    444
    Vote Rating
    7
      0  

    Default

    got it. thanks!

  4. #4
    Sencha User
    Join Date
    Jul 2016
    Posts
    37
    Vote Rating
    1
      0  

    Default

    When merging process starts? I've overridden one of the methods of Mixin, but it hasn't been overrode in target class. So I assume that merging goes before overriding. If it is true, how to override mixins method properly?

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
  •