As far as I know, CF doesn't have a built in "instanceOf" operator or
method. The way to get around this might be to have a public property for
objects Ex.:

SESSION.CurrentUser.InstanceOf()

Which would return, as a string, something like "manager" or "worker".

.......................
Ben Nadel 
www.bennadel.com
-----Original Message-----
From: Joelle Tegwen [mailto:[EMAIL PROTECTED] 
Sent: Monday, May 08, 2006 12:38 PM
To: CF-Talk
Subject: Test object type

I have a User.cfc, Manager.cfc and Worker.cfc. Manager and Worker extend
User.

I would like to be able to test whether an instantiated object is a Worker
or a Manager.

Something like <cfif isObjectType(#session.currentUser#,
#ttComponents.Manager#)>

But I don't know what "isObjectType" is really called :)

Can I do this or do I need isWorker and isManager functions in my classes?

Thanks
Joelle



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:239820
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=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to