Results 1 to 8 of 8

Thread: Ext.ux.Deferred

  1. #1
    Sencha User
    Join Date
    May 2011
    Location
    Italy
    Posts
    74

    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 Premium User mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    40,379

    Default

    Very nice work!
    Mitchell Simoens @LikelyMitch

    Check out my GitHub:
    https://github.com/mitchellsimoens

    Posts are my own, not any current, past or future employer's.

  3. #3
    Sencha User
    Join Date
    May 2011
    Location
    Italy
    Posts
    74

    Default

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

  4. #4
    Sencha Premium Member
    Join Date
    Jun 2008
    Posts
    380

    Default

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

  5. #5
    Ext Premium Member
    Join Date
    Aug 2010
    Posts
    12

    Default

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

  6. #6
    Sencha Premium User dawesi's Avatar
    Join Date
    Mar 2007
    Location
    Melbourne, Australia (aka GMT+10)
    Posts
    1,255

    Default

    For anyone who stumbles on this, promises are now in Sencha Touch 2.3 (and space)
    Cloud Application Architect

    Sencha Specialist / Sencha MVP / Sencha Technical Trainer
    ExtJs Developer + Contributor since 0.2.2 - Champion of the per developer license.

  7. #7
    Sencha User
    Join Date
    May 2011
    Location
    Italy
    Posts
    74

    Default

    Good to hear it!

  8. #8

    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
  •