Results 1 to 2 of 2
  1.    #1  
    I'm having an issue that has carried over from a different app that I created. I'm doing a general AJAX request:

    Code:
    	var request = new Ajax.Request(this.feedUrl, {
    		method: 'get',	
    		evalJSON: 'false',
    		content: 'text/xml',
    		onSuccess: this.feedSuccess.bind(this),
    		onFailure: this.feedFailure.bind(this),
    		onTimeout: this.feedTimeout.bind(this)
    	});
    On each of the three event callbacks, I have a dialog that will popup and tell me which event fired. (the request downloads a podcast XML feed)

    Well the problem is after not using the program for several hours, the first time I use it I get no response from the ajax, no fired events, nothing. All that happens is my little spinner sits there and spins waiting for one of my events to fire. I let the program run for more than 10 minutes and still don't get any of the events firing, not even a timeout.

    If I close the program and run it immediately after, no problem whatsoever, I get the XML feed immediately and this will happen all subsequent times until I don't use the program for a while again.

    Not sure why I'm getting no love the first time. I searched both here and the developer.palm.com website and it seems that noone has received an answer for this problem. I also asked the palm developers back in the early access program days and got no response.

    EDIT:

    OK I added the "onComplete: this.feedComplete.bind(this);" callback and after about 30 seconds the feedComplete function fired without calling success failure or timeout. I guess I'll have to add some variables to feedComplete to get all the status data to figure out why no other functions are being called.

    Anyone have any ideas why its doing this?

    seige
    Last edited by seigex; 09/14/2009 at 12:11 AM.
  2. #2  
    I've noticed this same problem in my app. After looking at similar existing apps, I think there's some timing issue (bug?) with the OS. I've added a "refresh" button (like in the browser app) to re-do the AJAX call and it works that way but obviously it's a work-around.

    I've also noticed other weird timing issues unrelated to AJAX calls that seems to happen when certain Widget calls are made in the setup(). I suspect that code is being run simultaneously in the OS (in the background) and something is not ready yet when certain OS calls are being made in setup().

    Perhaps, things will get cleaned up in the next version of the WebOS.

Posting Permissions