Actually, it's not a CF builtin function, it's a member method of java.lang.Object, which every Java object inherits from. Therefore, every object in Java (and CF, because CF is written in Java), has a getClass method automatically.
There are several other method like this, most notably 'equals' and 'clone', which I've had to dodge numerous times. cheers, barneyb On 6/23/05, Bill Rawlinson <[EMAIL PROTECTED]> wrote: > Just to warn you all what might seem an obvious thing but: > > getClass is not a valid UDF name (CF MX 6.1) > > I was working on a system today that dealt with student enrollments. > The studentenrollment.cfc was a composite object of a student, a > class, and some other enrollment specific information (test scores, > etc..). > > Anyway, I wanted to create a method that would return to me the > instance of the class object in the studentenrollment. What better > name that getClass()? > > Well, even though it isn't documented in the MX 6.1 live docs list of > CF functions > (http://livedocs.macromedia.com/coldfusion/6.1/htmldocs/function.htm#wp3082862) > coldfusion returns an error saying it is. > > I didn't have time to dig into the error at all earlier, Instead I > just refactored and changed everything to "course" instead of "class" > so I'm not sure exactly what getClass returns (though I would assume > it might be something like getMetaData(). > > > So, getClass is an undocumented coldfusion built in function. Don't > try to use it as a UDF name (even when you really want to). > > If someone else gets a chance to see what getClass does I'd love to > hear about it. > > Bill > -- Barney Boisvert [EMAIL PROTECTED] 360.319.6145 http://www.barneyb.com/ Got Gmail? I have 50 invites. ---------------------------------------------------------- You are subscribed to cfcdev. To unsubscribe, send an email to [email protected] with the words 'unsubscribe cfcdev' as the subject of the email. CFCDev is run by CFCZone (www.cfczone.org) and supported by CFXHosting (www.cfxhosting.com). CFCDev is supported by New Atlanta, makers of BlueDragon http://www.newatlanta.com/products/bluedragon/index.cfm An archive of the CFCDev list is available at www.mail-archive.com/[email protected]
