Ed Griffiths wrote:
HiQuick question. If you store an object in a variable like this: <cfset myObject = createObject("component","testObject").init()> Is it possible to interrogate some method or metadata associated with testObject in order to find out what variable name it has been stored within (myObject in this case)?
It would be easy enough to pass in a string value that is the same as the variable name at time of instantiation as an init parameter. However, as Hal and others have pointed out, the variable being used at the time can easily be different based upon where and how the variable is being stored within the execution of the code. One thing that might drive a better resolution to this issue if for you to share specifically what problem(s) you are trying solve that knowing the specific variable name of the object will provide some programmatic benefit. Danilo Celic You are subscribed to cfcdev. To unsubscribe, please follow the instructions at http://www.cfczone.org/listserv.cfm CFCDev is supported by: Katapult Media, Inc. We are cool code geeks looking for fun projects to rock! www.katapultmedia.com An archive of the CFCDev list is available at www.mail-archive.com/[email protected]
