PDA

View Full Version : Sencha Touch freezes after a number of ajax connections



wellsbr01
1 Dec 2010, 7:06 PM
Hi,

In my project I use Ajax to retrieve contents in an arbitrary number of panels. Each interaction will create a new panel and then display it. All goes well, then, at some unexpected point, the application ceases accessing the server and doesn't proceed. The code is as:

Ext.Ajax.request({
url: "a long url",
success: function(response, opts) {
var obj = Ext.decode(response.responseText);
var component = process(obj);
component.setScrollable('vertical');
contentsp.add(component);
contentsp.setActiveItem(contentsp.items.length-1,'slide');
titlep.update("<span class='title-txt'>"+lbl+"</span>");
root.doComponentLayout();
Ext.repaint();
},
failure: function(response, opts) {
Ext.repaint();
}
});


There's also a procedure to remove the added components. The process() procedure creates a panel with the json received and returns it back to the function.

In testing it with Safari, I noticed no error but:

TypeError: Result of expression 'c' [null] is not an object.

I was unable to trace this back to anything I'm doing in the above code.
I've tried everything to understand WHAT could be causing this to no avail.

What is this error? What should I do to solve this? It's an error inside sencha-touch.js, I'm using the 1.0RC release.

Any ideas?

Cheers,