listlast(getMetadata(obj).name,".")

probably more efficient to have a getType() function in each cfc though.
then perhaps a user.equals(anotherobj) function which utilises it e.g.

return if(arguments.obj.getType() eq this.getType())



-----Original Message-----
From: Joelle Tegwen [mailto:[EMAIL PROTECTED]
Sent: 08 May 2006 17:38
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:239819
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=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to