1. #11
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    37,073
    Vote Rating
    854
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      0  

    Default


    I need more than 24 hours in one day I try to blog when I have time but time is hard to come by.
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!

    When posting code, please use BBCode's CODE tags.

  2. #12
    Sencha Premium Member
    Join Date
    Sep 2010
    Posts
    89
    Vote Rating
    0
    xun is an unknown quantity at this point

      0  

    Default


    yea, i wish you have more than 24 hours a day too and no other life

    one more question, in most of the above samples, for example:

    listeners : {
    single : true,
    render : someFunction
    }

    what does the config mean?
    single: true

    I tried to find it in the massive api. somehow did not find it.

    thanks

  3. #13
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    37,073
    Vote Rating
    854
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      0  

    Default


    For performance if an event only fires once or you only want it to fire once then you add the single : true event option. This will remove the listener after the first firing otherwise you will have a hanging listener that will never fire again.
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!

    When posting code, please use BBCode's CODE tags.

  4. #14
    Sencha - Ext JS Dev Team Animal's Avatar
    Join Date
    Mar 2007
    Location
    Notts/Redwood City
    Posts
    30,505
    Vote Rating
    52
    Animal has a spectacular aura about Animal has a spectacular aura about Animal has a spectacular aura about

      0  

    Default


    Quote Originally Posted by xun View Post
    yea, i wish you have more than 24 hours a day too and no other life

    one more question, in most of the above samples, for example:

    listeners : {
    single : true,
    render : someFunction
    }

    what does the config mean?
    single: true

    I tried to find it in the massive api. somehow did not find it.

    thanks
    http://docs.sencha.com/ext-js/4-0/#!...nent-method-on

  5. #15
    Sencha - Ext JS Dev Team dongryphon's Avatar
    Join Date
    Jul 2009
    Posts
    1,346
    Vote Rating
    134
    dongryphon is a name known to all dongryphon is a name known to all dongryphon is a name known to all dongryphon is a name known to all dongryphon is a name known to all dongryphon is a name known to all

      0  

    Default


    Quote Originally Posted by xun View Post
    The render event.

    If you run the dummy component, the render event did not fire.

    Thanks for the reply
    Just to clarify, the example code actually overrides the "render" method and does not pass along the arguments to the base class.

    The component does not get rendered automatically - this has to be requested. Either with a "renderTo" config or by calling "render". So, while the example creates the component, it does not render it.

    Lastly, the "render" method has undergone some changes in 4.1. See http://www.sencha.com/forum/showthre...29-API-Changes for details. If you have components that override the "render" method like this, and if those components are in a container, their "render" method will no longer be called. This is explained in the link, but is a result of bulk rendering.

    If you listen to the "render" event as Mitchell describes, this will work very similarly to 4.0. The bug Mitchell describes for the "render" event in 4.1 beta is specific to MVC.
    Don Griffin
    Ext JS Development Team Lead

    Check the docs. Learn how to (properly) report a framework issue and a Sencha Cmd issue

    "Use the source, Luke!"

  6. #16
    Sencha Premium Member
    Join Date
    Sep 2010
    Posts
    89
    Vote Rating
    0
    xun is an unknown quantity at this point

      0  

    Default


    thanks, that explains it.