search section / xml response time out


I'm currently building an app that has a search section. Basically, im appending input from a TextField element to a URL string and then making an xmlHttpRequest to retrieve the results. My problem is a bit strange; it works the first few times but if i let the simulator sit for about 2-3 minutes and then try to make another request, it just hangs and i get a timeout error along with a connection unavailable dialog. The widget then closes.

I structured my search code into two sections.

    A dispatcher function that is called when the user presses enter on the textfield. This function checks if the network is down, sets the wait indicator, and fires off the request.

    The callback function that checks that the ready state and status is OK, sets the networkRequestFaild to false and then parse the request, and changes the dataset once its finished

I got a friend to look at it and said it could be a memory leak.

Any other feedback would help.


1 Reply

Recent Posts

in General - Yahoo! TV Widgets