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
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
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
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
-
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
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
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
. 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
8 matches
Mail list logo