1. #1
    Sencha User luismerino's Avatar
    Join Date
    Oct 2011
    Location
    Berlin
    Posts
    46
    Vote Rating
    4
    luismerino is on a distinguished road

      0  

    Default What events to rely on when a View gets initialized?

    What events to rely on when a View gets initialized?


    On extending Ext.Component or Ext.Container to create a View, I've been using 'painted' as the indicator that a view has been placed in the DOM and correctly constructed. Now, 'painted' seems to be firing twice, so seems like 'show' is the only choice left for this. Why isn't there a 'render' event that gets fired only once?

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

      0  

    Default


    painted gets fired anytime your component element is shown in the browser. erased is called anytime it is hidden.

    There is a bug in PR2 where the painted event gets fired twice. There is a ticket opened for that already.

    As for a render event, it cannot exist. There is simply no such thing anymore in ST2 as a components element is always rendered (just not necessarily in the dom, just in memory).

    What we suggest you do is override the initialize method (ensure you call callParent()), and do your logic in there. The component element will already exist by the point, but it will not be added into the dom (this will only happen when it needs to).
    Sencha Inc.
    Robert Dougan - @rdougan
    Sencha Touch 2 and Ext JS 4 Core Team Member, SASS/Theming Wizard.

  3. #3
    Sencha User luismerino's Avatar
    Join Date
    Oct 2011
    Location
    Berlin
    Posts
    46
    Vote Rating
    4
    luismerino is on a distinguished road

      0  

    Default


    Awesome, thanks!

Thread Participants: 1

film izle

hd film izle

film sitesi

takipci kazanma sitesi

takipci kazanma sitesi

güzel olan herşey

takipci alma sitesi

komik eğlenceli videolar