Ok, I've seen that to test a cf variable against null (from a java
method call that can return null), you have to do this:

<cfscript>
x = someJavaObj.methodCall();
if (IsDefined('x")) {
        //x is not null
} else {
        // x is null
}
</cfscript>


Is there no way to do this with a UDF, or something?  I figure you
can't, because the (unquoted) variable doesn't exist anymore (literally
is not defined), but man, this sucks for readability (where an IsNull()
test or something would be nice), and IsDefined() won't work to test
against a method call directly, so you have to introduce a variable
name. 

Was this improved in CFMX 7.0?

Thanks
        Mark

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:232228
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to