1. #1
    Sencha Premium Member
    Join Date
    Dec 2011
    Location
    London, UK
    Posts
    260
    Vote Rating
    8
    bseddon will become famous soon enough

      0  

    Default 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)?

  2. #2
    Sencha - Architect Dev Team aconran's Avatar
    Join Date
    Mar 2007
    Posts
    9,369
    Vote Rating
    128
    aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold

      0  

    Default


    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

  3. #3
    Sencha Premium Member
    Join Date
    Dec 2011
    Location
    London, UK
    Posts
    260
    Vote Rating
    8
    bseddon will become famous soon enough

      0  

    Default


    <<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.

Thread Participants: 1