You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@thrift.apache.org by "Kenny (Created) (JIRA)" <ji...@apache.org> on 2012/02/10 20:55:00 UTC

[jira] [Created] (THRIFT-1514) Callbacks with newer jQuery versions don't work

Callbacks with newer jQuery versions don't work
-----------------------------------------------

                 Key: THRIFT-1514
                 URL: https://issues.apache.org/jira/browse/THRIFT-1514
             Project: Thrift
          Issue Type: Bug
          Components: JavaScript - Library
    Affects Versions: 0.9
            Reporter: Kenny
            Priority: Minor


When using jQuery 1.7.1 callbacks don't work. The following error is returned:

TypeError: Object function ( selector, context ) { // The jQuery object is actually just the init constructor 'enhanced' return new jQuery.fn.init( selector, context, rootjQuery ); } has no method '_Deferred'

It seems _Deferred no longer exists.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (THRIFT-1514) Callbacks with newer jQuery versions don't work

Posted by "Andrew Grumet (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/THRIFT-1514?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Andrew Grumet updated THRIFT-1514:
----------------------------------

    Attachment: THRIFT-1514.patch

The attached patch passes the unit tests for jquery 1.5, 1.6 and 1.7.

We removed the extra layer of deferreds, using a custom jQuery ajax converter to deserialize thrift objects.

Instead of returning a custom deferred, we instead return the XHR itself, which exposes the same promise interface.

The patch introduces a minor difference from previous versions.  Namely, the thrift exception object is now the third argument passed to error() callbacks, instead of the first.  This ordering comes from the jQuery.ajax itself, which invokes error callbacks with [jXHR, statusText, error].
                
> Callbacks with newer jQuery versions don't work
> -----------------------------------------------
>
>                 Key: THRIFT-1514
>                 URL: https://issues.apache.org/jira/browse/THRIFT-1514
>             Project: Thrift
>          Issue Type: Bug
>          Components: JavaScript - Library
>    Affects Versions: 0.9
>            Reporter: Kenny
>            Priority: Minor
>         Attachments: THRIFT-1514.patch
>
>
> When using jQuery 1.7.1 callbacks don't work. The following error is returned:
> TypeError: Object function ( selector, context ) { // The jQuery object is actually just the init constructor 'enhanced' return new jQuery.fn.init( selector, context, rootjQuery ); } has no method '_Deferred'
> It seems _Deferred no longer exists.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (THRIFT-1514) Callbacks with newer jQuery versions don't work

Posted by "Henrique Mendonca (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/THRIFT-1514?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13269579#comment-13269579 ] 

Henrique Mendonca commented on THRIFT-1514:
-------------------------------------------

hm... this is not back compatible with the legacy code (i.e. error(function(xhr,status,e)..., sucess(result, [call_arguments])), which is kind of a shame... However, it's a good simplification of the code.
Does it bother anyone else?
                
> Callbacks with newer jQuery versions don't work
> -----------------------------------------------
>
>                 Key: THRIFT-1514
>                 URL: https://issues.apache.org/jira/browse/THRIFT-1514
>             Project: Thrift
>          Issue Type: Bug
>          Components: JavaScript - Library
>    Affects Versions: 0.9
>            Reporter: Kenny
>            Assignee: Andrew Grumet
>            Priority: Minor
>         Attachments: THRIFT-1514.patch
>
>
> When using jQuery 1.7.1 callbacks don't work. The following error is returned:
> TypeError: Object function ( selector, context ) { // The jQuery object is actually just the init constructor 'enhanced' return new jQuery.fn.init( selector, context, rootjQuery ); } has no method '_Deferred'
> It seems _Deferred no longer exists.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (THRIFT-1514) Callbacks with newer jQuery versions don't work

Posted by "Hudson (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/THRIFT-1514?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13265757#comment-13265757 ] 

Hudson commented on THRIFT-1514:
--------------------------------

Integrated in Thrift #444 (See [https://builds.apache.org/job/Thrift/444/])
    THRIFT-1514 Callbacks with newer jQuery versions don't work
Patch: Andrew Grumet (Revision 1332619)

     Result = SUCCESS
roger : http://svn.apache.org/viewvc/?view=rev&rev=1332619
Files : 
* /thrift/trunk/lib/js/test/build.xml
* /thrift/trunk/lib/js/test/test.html
* /thrift/trunk/lib/js/test/test.js
* /thrift/trunk/lib/js/thrift.js

                
> Callbacks with newer jQuery versions don't work
> -----------------------------------------------
>
>                 Key: THRIFT-1514
>                 URL: https://issues.apache.org/jira/browse/THRIFT-1514
>             Project: Thrift
>          Issue Type: Bug
>          Components: JavaScript - Library
>    Affects Versions: 0.9
>            Reporter: Kenny
>            Assignee: Andrew Grumet
>            Priority: Minor
>         Attachments: THRIFT-1514.patch
>
>
> When using jQuery 1.7.1 callbacks don't work. The following error is returned:
> TypeError: Object function ( selector, context ) { // The jQuery object is actually just the init constructor 'enhanced' return new jQuery.fn.init( selector, context, rootjQuery ); } has no method '_Deferred'
> It seems _Deferred no longer exists.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (THRIFT-1514) Callbacks with newer jQuery versions don't work

Posted by "Andrew Grumet (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/THRIFT-1514?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13273074#comment-13273074 ] 

Andrew Grumet commented on THRIFT-1514:
---------------------------------------

Yeah, didn't mean to surprise.

Here is more background.  After switching the code to use an ajax converter, the deferreds served only to remap callback arguments.  Taking that out meant that client code would get back a jqXHR.  So my equation was: less code + familiar return object > compat in this case.  But it was absolutely one person's judgement call.

Happy to discuss some more, and help rework the patch if this doesn't work for you guys.


                
> Callbacks with newer jQuery versions don't work
> -----------------------------------------------
>
>                 Key: THRIFT-1514
>                 URL: https://issues.apache.org/jira/browse/THRIFT-1514
>             Project: Thrift
>          Issue Type: Bug
>          Components: JavaScript - Library
>    Affects Versions: 0.9
>            Reporter: Kenny
>            Assignee: Andrew Grumet
>            Priority: Minor
>         Attachments: THRIFT-1514.patch
>
>
> When using jQuery 1.7.1 callbacks don't work. The following error is returned:
> TypeError: Object function ( selector, context ) { // The jQuery object is actually just the init constructor 'enhanced' return new jQuery.fn.init( selector, context, rootjQuery ); } has no method '_Deferred'
> It seems _Deferred no longer exists.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Resolved] (THRIFT-1514) Callbacks with newer jQuery versions don't work

Posted by "Roger Meier (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/THRIFT-1514?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Roger Meier resolved THRIFT-1514.
---------------------------------

    Resolution: Fixed
      Assignee: Andrew Grumet

Thanks Andrew!
committed
;-r
                
> Callbacks with newer jQuery versions don't work
> -----------------------------------------------
>
>                 Key: THRIFT-1514
>                 URL: https://issues.apache.org/jira/browse/THRIFT-1514
>             Project: Thrift
>          Issue Type: Bug
>          Components: JavaScript - Library
>    Affects Versions: 0.9
>            Reporter: Kenny
>            Assignee: Andrew Grumet
>            Priority: Minor
>         Attachments: THRIFT-1514.patch
>
>
> When using jQuery 1.7.1 callbacks don't work. The following error is returned:
> TypeError: Object function ( selector, context ) { // The jQuery object is actually just the init constructor 'enhanced' return new jQuery.fn.init( selector, context, rootjQuery ); } has no method '_Deferred'
> It seems _Deferred no longer exists.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (THRIFT-1514) Callbacks with newer jQuery versions don't work

Posted by "Roger Meier (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/THRIFT-1514?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13271645#comment-13271645 ] 

Roger Meier commented on THRIFT-1514:
-------------------------------------

ok, henrique
I'm ready to keep backward compatibility if you as original author need this... I did not recognize that.
just reopen this issue and submit a patch.
;-r
                
> Callbacks with newer jQuery versions don't work
> -----------------------------------------------
>
>                 Key: THRIFT-1514
>                 URL: https://issues.apache.org/jira/browse/THRIFT-1514
>             Project: Thrift
>          Issue Type: Bug
>          Components: JavaScript - Library
>    Affects Versions: 0.9
>            Reporter: Kenny
>            Assignee: Andrew Grumet
>            Priority: Minor
>         Attachments: THRIFT-1514.patch
>
>
> When using jQuery 1.7.1 callbacks don't work. The following error is returned:
> TypeError: Object function ( selector, context ) { // The jQuery object is actually just the init constructor 'enhanced' return new jQuery.fn.init( selector, context, rootjQuery ); } has no method '_Deferred'
> It seems _Deferred no longer exists.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira