The IsDefined() function checks to see if a specified variable or object exists. But what if you wanted to then check to see if it was of a specific type or an instance of a specific component? You could use one of the many Is functions, but there is a better way. IsObject() takes the name of an object (a variable) and a type to check. For example, IsObject(var, “array”) checks to see if var is an array, and IsObject(var, “user”) checks to see if var is an instance of a user component. (Applies to: ColdFusion MX)

Leave a Reply