1. #1
    Sencha Premium Member
    Join Date
    Nov 2011
    Posts
    162
    Vote Rating
    2
    Answers
    7
    UbuntuPenguin is on a distinguished road

      0  

    Default Answered: Component Lifecycle

    Answered: Component Lifecycle


    Hello Everyone,
    Where can I learn more about the various component lifecycle functions and properties. I have run into "initialize" but I can't seem to find too many others. Any help is greatly appreciated.

  2. There is initialize as you already mentioned, and that is about all you need to worry about. This is because you already have access to the component element at that point, even if it is not rendered, because we store it in the browser memory.

    There is also the destroy() method to... destroy the component.

    It is also sometimes useful to listen to the painted and erased events. Painted is fired when the components element is shown on the screen, erased is when it is hidden on the screen.

  3. #2
    Sencha - Sencha Touch Dev Team rdougan's Avatar
    Join Date
    Oct 2008
    Posts
    1,158
    Vote Rating
    6
    Answers
    93
    rdougan will become famous soon enough

      0  

    Default


    There is initialize as you already mentioned, and that is about all you need to worry about. This is because you already have access to the component element at that point, even if it is not rendered, because we store it in the browser memory.

    There is also the destroy() method to... destroy the component.

    It is also sometimes useful to listen to the painted and erased events. Painted is fired when the components element is shown on the screen, erased is when it is hidden on the screen.
    Sencha Inc.
    Robert Dougan - @rdougan
    Sencha Touch 2 and Ext JS 4 Core Team Member, SASS/Theming Wizard.

  4. #3
    Sencha Premium Member
    Join Date
    Nov 2011
    Posts
    162
    Vote Rating
    2
    Answers
    7
    UbuntuPenguin is on a distinguished road

      0  

    Default


    Thanks again rdougan, I was just wondering because of past experiences with other languages and wanted to make sure I wasn't assuming something I shouldn't have.

Thread Participants: 1