-
17 Mar 2012 4:18 PM #1
Confused: controller launch vs onLaunch
Confused: controller launch vs onLaunch
Build 311
I've been building an app and have noticed the 311 designer allows me to edit a function called 'launch' (init also but here I'm focused on launch). It appears this function is not called by ExtJS 4.0.7 or nightly builds.
I'm sure that in previous versions this was called 'onLaunch'. Certainly projects I've created with previous designer versions have a function of onLaunch in their controllers. So I added a basic function called 'onLaunch' to the controller using 311 and it is executed by ExtJS. However the designer warns that a function with the name onLaunch is being overridden.
Has something changed? Why is 'launch' not being called (or why is it being generated)? Should I have to create a function named 'onLaunch' (did I always do this)?
-
17 Mar 2012 5:01 PM #2
We have some work to do here.
Ext JS should be generating an onLaunch method. Sencha Touch should be generating a launch method.
Just because a method is being overridden isn't necessarily a bad thing. We just warn you so that you know that you will in most cases want to invoke the parent class implementation.Aaron Conran
@aconran
Sencha Architect Development Team
-
17 Mar 2012 5:09 PM #3
<<Just because a method is being overridden isn't necessarily a bad thing>>
Thanks for the information and explanation. I was confused and wondering if I'd lost the plot. Now I know for sure its not problem.


Reply With Quote