Writing an 'instanceOf' method in a base class (perhaps component.cfc,
if you've got access) is very straightforward.  Just use the CFC
metadata to scan up the inheritance chain and see if the type in
question matches anything.  With CF8, you'll also need to account for
interfaces, but that should be pretty trivial.

cheers,
barneyb

On 6/6/07, Scott Stewart <[EMAIL PROTECTED]> wrote:
> Hey all,
>
> This question was posed to me by one of my colleagues. I don't have an
> answer for him, but I'm hoping someone on the list does.
>
> Thanks
>
> sas
>
> --
> Scott Stewart
> ColdFusion Developer
>
> SSTWebworks
> 7241 Jillspring Ct.
> Springfield, Va. 22152
> (703) 220-2835
>
> http://www.sstwebworks.com
>
> -----Original Message-----
> From: Leeds, David [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, June 06, 2007 4:08 PM
> To: Scott Stewart
> Subject: Quick CFC question
>
> Hey Scott,
>
> In some OO languages you can use something like typeof() to determine if
> an object is a certain class.  Do you know of a way to do that with
> CFCs?
>
> Thanks!!
> Dave
>
> No virus found in this incoming message.
> Checked by AVG Free Edition.
> Version: 7.5.472 / Virus Database: 269.8.9/834 - Release Date: 6/5/2007 2:38
> PM
>
>
>
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Macromedia ColdFusion MX7
Upgrade to MX7 & experience time-saving features, more productivity.
http://www.adobe.com/products/coldfusion?sdid=RVJW

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:280300
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