Page 2 of 2 FirstFirst 12
Results 11 to 16 of 16

Thread: Custom Render event does not fire???

  1. #11
    Sencha - Sr Software Engineer mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    39,421
    Vote Rating
    1271
      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 @LikelyMitch
    Sencha Inc, Senior Software Engineer
    ________________
    Learn BBCode and use it!

    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 User
    Join Date
    Sep 2010
    Posts
    89
    Vote Rating
    0
      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 - Sr Software Engineer mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    39,421
    Vote Rating
    1271
      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 @LikelyMitch
    Sencha Inc, Senior Software Engineer
    ________________
    Learn BBCode and use it!

    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,608
    Vote Rating
    59
      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
    Location
    Kansas
    Posts
    1,711
    Vote Rating
    245
      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
    Director of Engineering - Frameworks (Ext JS / Sencha Touch)

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

    "Use the source, Luke!"

  6. #16
    Sencha User
    Join Date
    Sep 2010
    Posts
    89
    Vote Rating
    0
      0  

    Default

    thanks, that explains it.

Page 2 of 2 FirstFirst 12

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •