Results 1 to 8 of 8

Thread: Ext.ux.Deferred

  1. #1
    Sencha User
    Join Date
    May 2011
    Location
    Italy
    Posts
    74
    Vote Rating
    10
      0  

    Default Ext.ux.Deferred

    Hey guys!

    Today I'm gonna to present javascript promises for ExtJS and Sencha Touch!
    Hell yeah!
    Nowadays, lots of frameworks and libraries have implemented promises: ExtJS/Sencha Touch wont be less so!

    Here's the problem:

    Code:
    aSync1 (10, function (val1) {
      aSync2 (val1, function (val2) {
        aSync3 (val2, function (val3) {
          alert ('Top of the pyramid with: ', val3);         
          });     
        }); 
    });
    and here the solution:

    Code:
    aSync1 (10)     
        .then (aSync2)     
        .then (aSync3)     
        .then (function (val3) {         
          alert ('End of the queue with: ', val3);     
        }); 
    });
    This is only one of the extraordinary things that Ext.ux.Deferred allows you to do!
    For more examples, read the docs on the github page: https://github.com/wilk/Ext.ux.Deferred

    For class documentation, lunch jsduck

    Sencha Market: https://market.sencha.com/extensions/ext-ux-deferred

    Enjoy it!

    Ciao!
    Wilk
    Last edited by Wilky; 22 May 2013 at 11:22 PM. Reason: added sencha market link

  2. #2
    Sencha - Sr Software Engineer mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    39,411
    Vote Rating
    1290
      1  

    Default

    Very nice work!
    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.

  3. #3
    Sencha User
    Join Date
    May 2011
    Location
    Italy
    Posts
    74
    Vote Rating
    10
      0  

    Default

    Quote Originally Posted by mitchellsimoens View Post
    Very nice work!
    Thanks

  4. #4
    Sencha Premium Member
    Join Date
    Jun 2008
    Posts
    387
    Vote Rating
    49
      0  

    Default

    Is this modeled after Promises/A ?
    I`m from Holland!

  5. #5
    Ext Premium Member
    Join Date
    Aug 2010
    Posts
    12
    Vote Rating
    1
      0  

    Default

    Anybody using DeftJS promises/deferreds? how it compare, they implement the Promises/A spec.
    http://deftjs.org/

  6. #6
    Sencha Premium Member dawesi's Avatar
    Join Date
    Mar 2007
    Location
    Melbourne, Australia (aka GMT+10)
    Posts
    1,093
    Vote Rating
    56
      1  

    Default

    For anyone who stumbles on this, promises are now in Sencha Touch 2.3 (and space)
    Lead Trainer / Sencha Specialist
    Community And Learning Systems

    Lead Architect
    DigitalTickets.net

  7. #7
    Sencha User
    Join Date
    May 2011
    Location
    Italy
    Posts
    74
    Vote Rating
    10
      0  

    Default

    Good to hear it!

  8. #8
    Sencha User
    Join Date
    Dec 2011
    Posts
    10
    Vote Rating
    0
      0  

    Default

    Quote Originally Posted by dawesi View Post
    For anyone who stumbles on this, promises are now in Sencha Touch 2.3 (and space)
    Are you referring to Ext.Promise? It's marked private. Am I missing something non-private? Are there any example on how to use this?

    Thanks!

Tags for this Thread

Posting Permissions

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