4

I've been over this for the past entire two days. I assume that JQMobi(Intel AppFramework) is a light version of JQuery plus a customized UI framework for mobile devices (iOS and Android). Read a lot about JQuery Deferred() methods in many websites and blogs, and tried to implement some examples in a phonegap project of mine that uses JQMobi. My ajax calls are been fired correctly, and success callback is successful:

$.ajax({
        url: 'http://drsolution.com.br/teste/texts.json',
        async: true,
       dataType:'json',
       success: function(data)
        {
         // do something with the json object, THIS IS ALWAYS WORKING
        },
       error: function(error)
       {
        console.log("error");
       }

      });

But when I try to use the deferred callback methods in the promise object returned by the ajax call, I get no response from them:

$.ajax({
        url: 'http://drsolution.com.br/teste/texts.json',
        async: true,
        dataType:'json',
        success: function(data)
        {
         // do something with the json object, THIS IS ALWAYS WORKING
        },
        error: function(error)
        {
          console.log("error");
        }

        }).done(function{
                        // never fired
                        }).fail(function {
                                         // never fired
                                         }).always(function {
                                                            //never fired
                                                            });

What is happening ? The deferred object is not implemented in JQMobi (Intel AppFramework) ?

Thank you in advance.

timss
  • 9,982
  • 4
  • 34
  • 56
delonsp
  • 85
  • 6
  • AFAIK, `.done()` etc should work - only an earlier uncaught error would block. – Beetroot-Beetroot May 02 '13 at 11:52
  • Accordin to Ian .done() is not implemented. – delonsp May 02 '13 at 17:41
  • Ah fair enough, I was assuming JQMobi was a jQuery plugin/derivative. I guess they leave things out to keep the code volume down. If so, and if they genuinely say "JQuery rewritten from the ground up ...", then the product should also carry a prominent "health warning". – Beetroot-Beetroot May 02 '13 at 19:34
  • They used this statement as marketing tool. The problem is App Framework is not nearly as well documented as JQuery. Maybe they will fix it in the upcoming months. – delonsp May 03 '13 at 13:29

1 Answers1

3

notice I'm the author of App Framework

App Framework (jqMobi) is NOT jQuery. It provides syntax similar to jQuery.

deferred/done/fail/always are not implemented in App Framework.

  • Pleased to meet you Ian and thank you for your answer. I thought that most of JQuery methods were implemented in App Framework. I´ve read somewhere that App Framework was "JQuery rewritten from the ground up, to be faster, etc...". The problem is I am using Dreamweaver to development and the autocomplete feature of it finds some methods that I am not sure that are native to App framework or from JQuery. The documentation of your library is not comprehensive (http://app-framework-software.intel.com/documentation.php), and sometimes I have to search through Jquery docs. – delonsp May 02 '13 at 17:37
  • http://app-framework-software.intel.com/api/index.html The above is found as the "API" link in the top. As to "rewritten from the ground up" - it's true, but also marketing speak ;) –  May 02 '13 at 18:09