You need to sign in to do that
Don't have an account?
jf317820
flex toolkit bug or my stupidity?
in the flex toolkit, is there a way to catch the "Cannot access a property or method of a null object reference."
when a query returns a null value? my problem is I have a query with a
nested query and whenever the nested query returns zero records, the object is returned as "null" and the null reference message is thrown, even thwarting my best attempts at catching it.
thanks in advance
thanks in advance
can you post an example of your query processing loops.
normaly you would test the nested query object against null before accessing the ".records.length"
i don't think it's a bug, and i'm sure you can catch the null access before it happens, are you using Flex Builder?
it has a great debugger allowing you to step thru the code, even look at vars.
Code:
Message Edited by jf317820 on 08-03-2007 01:27 PM
if (qr.size > 0) {
//do your query processing here.
}
Cheers
Code:
but the code above is what's producing the error. shouldn't i be able to make the above if statement?
Try qr.records[i].hasOwnProperty("ProcessInstances");
This function is for dynamic objects and will indicate if that field exists on the record.
Cheers.
Code: