I am using a local data source for ListGrids. Here is code:
var DSRecords = dataSourceObject.recordsFromXML(isc.XMLTools.selectNodes(xmlDoc, RecordXPath));
isc.ResultSet.create
({
ID: resultSetName,
dataSource : dataSourceObject,
initialData : DSRecords
});
ListGrid.setData(eval(resultSetName));
That basically works fine if I run this code for first time. But if execute it again I am getting This.body undefined error and debugger points to a line in SC code. Interrsting enough, I have more ListGrids with data provided like this and they are not failing.
That’s obviously not enough code for anyone to help you. Try putting together a self-contained test case and you’ll probably find the bug.
By the way, you don’t need to use eval() there or in any similar circumstance. ResultSet.create() returns the created ResultSet, and it’s also accessible as window[resultSetName].
I understand that a working sample as an illustration is the best but my app. is pretty big and I am not sure that it would be relatively simple for me to extract not working part. Still I will try but meanwhile I can set up an access for you to my application with instractions how to trigger the problem. That way you can see all the details. Let me know if that might work to resolve the issue. Like I said the problem pattern is not very clear to me so creating a sample to reproduce the issue might take a while.
Short of a standalone test case, the Debugging topic lists many things that should be included in order to allow other people to help you - stack traces for JS errors (from IE and Firefox), contents of the Devleoper Console, etc.
The Debugging topic also provides advice for how to quickly prepare a standalone test case from a large application.