So, if the type isn't what you want, you're planning to throw an exception,
right?

As Charlie mentioned, I would suggest that you embrace type="any".  This is
known as 'duck typing'.  If it looks like a duck, and if it walks like a
duck, and if it quacks like a duck, it must be a duck!

You're expecting the components in the array to have a particular API,
right?  So if one is called that does not have the correct API, an exception
is thrown automatically, right?  Whether you throw the exception manually
because the provided component is not the "right type", or whether CF throws
the exception because the provided component does not have the requested
API, an exception is still going to be thrown, and you're still going to
have to address the issue prior to moving on.

In short, duck typing is your friend.

(Yes, I realize how funny it is that a guy with my last name would talk
about duck typing.)


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;207172674;29440083;f

Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:321205
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to