-
4 Nov 2011 12:26 AM #1
Answered: Is there a Ext.Container render-complete callback?
Answered: Is there a Ext.Container render-complete callback?
I need to know when a specific view has rendered, is there a callback for this? just like body onload...
-
Best Answer Posted by logicseeds
activate might work for you? activate is fired when a cardslide component gets focus, opposite is the deactivate event.
they have deprecated the onRender method and i guess thats why this.on('render':...) aint working.
try using 'painted' event, should work for now (however i believe this may be subject to change in final release)
-
4 Nov 2011 1:06 AM #2
onRender or onPainted event?
onRender or onPainted event?
activate might work for you? activate is fired when a cardslide component gets focus, opposite is the deactivate event.
they have deprecated the onRender method and i guess thats why this.on('render':...) aint working.
try using 'painted' event, should work for now (however i believe this may be subject to change in final release)
-
4 Nov 2011 2:05 AM #3
In this particular situation, the view in question is a Ext.panel and the event onRender is the only one working.
You say onRender is deprecated, where can you see that? I can't even find render or painted events in the documentation http://docs.sencha.com/touch/2-0/#!/api
-
4 Nov 2011 2:15 AM #4
if you define your own extension of a Ext.Panel, then override the onRender method with your own - console output is
"DEPRECATED blah blah, put your code in initialize instead"
i believe this is wrong:
as what youre basically doing is creating a hook to a function - and not an event. The internal eventhandler calls your panels function onRender - and therefore you receive a notice of it in listener. Best practice is to hook onto event instead.PHP Code:myPanel.on( {
"onRender" : function() {}
});
I saw a developer suggest using component#painted event, have not found documentation for this but think it is one of the basic structures, something similar to Container or Component or AbstractElement or like. Browse through the source code for fireEvent / fireAction.


Reply With Quote