Have to love that - I've been staring at it for ages, and one minute after I posted above, I tripped over the solution.
The problem was (just in case anyoune suffers the same) - I was passing the JSON response from one function to another. To do this I should have parsed it both before and after sending.
Code:
function getAll(){
var request = google.gears.factory.create('beta.httprequest');
request.open('GET', '/find/gearssetup/');
request.onreadystatechange = function() {
if (request.readyState == 4) {
try{
var response = request.responseText;
var r = {};
r = eval("(" + response + ")"); // ** Needed to Parse here too
processAll(r);
}// try
catch(ex){
log("Error: " + ex.message);
} // catch
} // readystate
}; // onstatechange
request.send();
} // getAll()
function processAll( response ){
var jsResp = eval("(" + response + ")");
....
....
}
Dave.