Results 1 to 9 of 9

Thread: [BETA1] Ext.util.JSONP second time call

    You found a bug! We've classified it as TOUCH-1825 . We encourage you to continue the discussion and to find an acceptable workaround while we work on a permanent fix.
  1. #1
    Sencha User
    Join Date
    Aug 2011
    Location
    Brescia - Italy
    Posts
    102
    Vote Rating
    4
      0  

    Default [BETA1] Ext.util.JSONP second time call

    In my project I'm using "Ext.util.JSONP" when I call it at first time it works, but at second time it doesn't call server.
    I have seen the sencha code and I have found that the problem is present because "Ext.util.JSONP.current" is not set to null after first call.
    I have used "Ext.util.JSONP.current = null;" before the "Ext.util.JSONP" call and now the problem is solved.

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

    Default

    Odd... Used Ext.data.JsonP and it worked more than one time.
    Mitchell Simoens @LikelyMitch
    Sencha Inc, Senior Software Engineer
    ________________
    Learn BBCode and use it! Checkout the CODE tag!

    Check out my GitHub, lots of nice things for Ext JS and Sencha Touch
    https://github.com/mitchellsimoens

  3. #3
    Sencha User Jamie Avins's Avatar
    Join Date
    Mar 2007
    Location
    Redwood City, California
    Posts
    3,661
    Vote Rating
    19
      0  

    Default

    The current property is cleared after every callback completes and before each request is queued. Without knowing how you are using the class I cannot see anything wrong.

    Sencha Inc

    Jamie Avins

    @jamieavins

  4. #4
    Sencha - Sr Software Engineer mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    39,556
    Vote Rating
    1272
      0  

    Default

    Now this is working for me where earlier it did not:

    Code:
    new Ext.Container({
        fullscreen : true,
        items      : [
            {
                xtype   : 'button',
                handler : function() {
                    Ext.data.JsonP.request({
                        url      : 'data.php',
                        callback : function() {
                            console.log('hi');
                        }
                    });
                }
            }
        ]
    });
    Mitchell Simoens @LikelyMitch
    Sencha Inc, Senior Software Engineer
    ________________
    Learn BBCode and use it! Checkout the CODE tag!

    Check out my GitHub, lots of nice things for Ext JS and Sencha Touch
    https://github.com/mitchellsimoens

  5. #5
    Sencha User
    Join Date
    Aug 2011
    Location
    Brescia - Italy
    Posts
    102
    Vote Rating
    4
      0  

    Default

    Using 'Ext.data.JsonP' it's all ok.
    thanks

  6. #6
    Sencha User
    Join Date
    Feb 2011
    Posts
    104
    Vote Rating
    0
      0  

    Default

    does this work now in the latest 1.x-build?

  7. #7
    Sencha - Sr Software Engineer mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    39,556
    Vote Rating
    1272
      0  

    Default

    Code in ST2 is not guaranteed to make it in ST1.
    Mitchell Simoens @LikelyMitch
    Sencha Inc, Senior Software Engineer
    ________________
    Learn BBCode and use it! Checkout the CODE tag!

    Check out my GitHub, lots of nice things for Ext JS and Sencha Touch
    https://github.com/mitchellsimoens

  8. #8
    Sencha User
    Join Date
    Feb 2011
    Posts
    104
    Vote Rating
    0
      0  

    Default

    so is there any workaround for ST1.1.1? I need this to be fixed very badly in my app... :-(

  9. #9
    Sencha User
    Join Date
    Feb 2011
    Posts
    104
    Vote Rating
    0
      0  

    Default

    even when I use

    PHP Code:
    Ext.util.JSONP.current null;
    Ext.util.JSONP.request(... 
    my second call doesn't go into the web...

Posting Permissions

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