Return Value of Function as items Pattern

Code in this post can be obsolete, however, principles and theory may still apply.
Share on FacebookTweet about this on TwitterShare on LinkedInShare on Google+Pin on PinterestEmail this to someone
Follow me:


I'm a well seasoned developer, consultant and educator of web applications based mainly on Sencha libraries, PHP, MySQL and Node.js. Besides (Apple) computers, I love photography and mountain biking.
Follow me:

Latest posts by Saki (see all)


  1. Lucian says

    A good example on how to use this pattern:

    That code will render a combobox for selecting one year between 1900 and the current year, basically an “year selector”.

  2. says

    the difference is scope : in case you need to refer to properties/methods of the class itself (this) inside the function.
    also, i think it’s a good practice to NOT use inline functions (closures) this way, but to refer to defined methods of the class, or to ‘helper’ methods.
    correct me if i’m wrong .

  3. plop plop says

    I’m trying to use this method to attache dynamicly a parameter to a proxy in a model.

    proxy : {
    extraParams : {
    test : (function(){
    return ‘test';

    This cause an error : Uncaught TypeError: undefined is not a function
    Where am I wrong ?

    • says

      createDelegate? This function has been removed in Ext 4. Now you would use something like this:

We will be happy to hear back from you

Please Login to post a comment