You don't want to do that in Coldfusion - it is unnecessary and is actually a 
performance hit as well. Read up on 'duck typing' - Sean Corfield has a nice 
powerpoint that outlines this concept. You have to remember that Coldfusion 
does not enforce strict typing; Coldfusion is not Java!! The basic idea is that 
if you pass in a value (be it a string, query, object, whatever) and it works 
within your code, it is of the correct type (if it walks like a duck, quacks 
like a duck, it's a duck!). If you pass in a numeric value to a function that 
is expecting a string, it's going to work. If you pass in an object with 
properties x, y, and z to a function expecting an object with properties x, y, 
and z it's going to work. If you were to restrict your function to only accept 
objects with a type of cfc.exampleObj, you are unnecessarily restricting the 
possible input of your function as well as creating a performance loss by 
making your function check the object's type in the first place!

As defined by Wikipedia - http://en.wikipedia.org/wiki/Duck_typing

Jake Pilgrim

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
ColdFusion MX7 by AdobeĀ®
Dyncamically transform webcontent into Adobe PDF with new ColdFusion MX7. 
Free Trial. http://www.adobe.com/products/coldfusion?sdid=RVJV

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:280305
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4

Reply via email to