1. #1
    Ext JS Premium Member
    Join Date
    Nov 2011
    Posts
    35
    Vote Rating
    1
    JamaSoftware-Sencha is on a distinguished road

      1  

    Default Unanswered: Is there any init methods that are automatically called for mixins?

    Unanswered: Is there any init methods that are automatically called for mixins?


    I want to create a mixin that does some initialization. Right now I'm defining a method "initMixinMethod()" in my mixin class, and then anything that mixes that in needs to call that inside of its initComponent() method.

    Is there a better way to do this?

    My preference would be that mixins could define an "initComponent" method, or something like that, that is automatically called for a component that mixes it in.

  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    37,525
    Vote Rating
    872
    Answers
    3564
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      -1  

    Default


    The way we do it is call the constructor of the mixin but technically you can do it any way.
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!

    When posting code, please use BBCode's CODE tags.

Thread Participants: 1

Tags for this Thread