Announcement

Collapse
No announcement yet.

[CLOSED] [Frameworks#15 ] [1.9] jQuery Deferred

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

    [CLOSED] [Frameworks#15 ] [1.9] jQuery Deferred

    I've been testing some Deferred functionality and it seems to me that there's an issue with the default static constructor function.

                 var d = jQuery.Deffered();
                  d.Resolve();
    will output
             var d = $.Deferred;
              d.resolve(null);
    which would result in
    Uncaught TypeError: d.resolve is not a function
    while what really should be output is
             var d = $.Deferred();
              d.resolve(null);
    This seems to happen because of Template definition
             [Template("$.Deferred")]
    which I think should be instead
             [Template("$.Deferred()")]

    #2
    Also is there a way to define the return type? If I try
                 jQuery.Deffered d = jQuery.Deffered( null );
    it complains the function is not a type

    Comment


      #3
      A pull request has been submitted by @erdomke which corrects this .Deferred issue and adds Generic support.

      https://github.com/bridgedotnet/Frameworks/pull/13

      The pull-request is being reviewed and we expect to include in the upcoming public release of Bridge 1.9.0.

      Comment


        #4
        We merged the Pull Request with the fix by @erdomke. It will be included in 1.9 release.

        Comment


          #5
          [email]Hi@zedr0n,

          In your example jQuery.Deferred is actually a method:

          jQuery.Deffered d = jQuery.Deffered( null );

          Please try one of the following:

          Bridge.jQuery2.Deferred  d1 = jQuery.Deferred(null);
          Deferred  d2 = jQuery.Deferred(null);
          var  d3 = jQuery.Deferred(null);
          Last edited by Daniil; 2015-09-09 @ 08:30 PM.

          Comment

          Working...
          X