RE: Test object type

2006-05-08 Thread Jim
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

RE: Test object type

2006-05-08 Thread Ben Nadel
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

RE: Test object type

2006-05-08 Thread Brad Wood
So I assume that you use session.currentUser to hold EITHER a manager object OR a worker object. This may be a stupid question since I don't have a lot of oop experience, but is it bad form to use the same variable name to store two different types of objects? That seems so create the problem

RE: Test object type

2006-05-08 Thread Dave Watts
So I assume that you use session.currentUser to hold EITHER a manager object OR a worker object. This may be a stupid question since I don't have a lot of oop experience, but is it bad form to use the same variable name to store two different types of objects? That seems so create

RE: Test object type

2006-05-08 Thread Brad Wood
- From: Dave Watts [mailto:[EMAIL PROTECTED] Sent: Monday, May 08, 2006 12:22 PM To: CF-Talk Subject: RE: Test object type So I assume that you use session.currentUser to hold EITHER a manager object OR a worker object. This may be a stupid question since I don't have a lot of oop

RE: Test object type

2006-05-08 Thread Ian Skinner
Also, can you create an interface with CFC's, and then implement that interface with another class? (Like other OOP languages) ~Brad No not directly. See the writings of Hal Helms and others on why this is not so good for CF. -- Ian Skinner Web Programmer BloodSource

RE: Test object type

2006-05-08 Thread Dave Watts
Ok, that makes sense. So is there an instanceof method in CF or something similar to tell you what class was used to create your object. You can use GetMetaData() to find this out. Also, can you create an interface with CFC's, and then implement that interface with another class? (Like

RE: Test object type

2006-05-08 Thread Phillip Holmes
. Holmes http://phillipholmes.com === -Original Message- From: Dave Watts [mailto:[EMAIL PROTECTED] Sent: Monday, May 08, 2006 12:22 PM To: CF-Talk Subject: RE: Test object type So I assume that you use session.currentUser to hold EITHER a manager object