370
Calling nested objects
The current release of ColdFusion does not support nested (scoped) object calls. For
example, if an object method returns another object and you must invoke a property
or method on that object, use the following syntax:
<cfset objX = myObj.X>
(The syntax
Getting Started with COM/DCOM
ColdFusion is an automation (late-binding) COM client. As a result, the COM object
must support the IDispatch interface, and arguments for methods and properties
must be standard automation types. Because ColdFusion is a typeless language, it
uses the object's type information to correctly set up the arguments on call
invocations. Any ambiguity in the object's data types can lead to unexpected
behavior.
In ColdFusion, you should only use server-side COM objects, which do not have a
graphical user interface. If your ColdFusion application invokes an object with a
graphical interface in a window, the component might appear on the Web server
desktop, not on the user's desktop. This can take up ColdFusion Server threads and
result in further Web server requests not being serviced.
ColdFusion can call Inproc, Local, or Remote COM objects. The attributes specified
in the
Requirements for COM
To make use of COM components in your ColdFusion application, you need at least
the following items:
<cfset prop = objX.Property>
<cfset prop = myObj.X.Property>
tag determine which type of object is called.
cfobject
Microsoft OLE/COM Object Viewer, available from Microsoft at http://
www.microsoft.com/com/resources/oleview.asp. This tool is handy for viewing
registered COM objects.
The COM objects, which are typically DLL or EXE files, that you want to use in
your ColdFusion application pages. These components should allow late
binding, that is, they should implement the IDispatch interface. Object Viewer
lets you view an object's class information so that you can properly define the
attribute for the
class
interfaces, so you can discover the properties and methods (for the IDispatch
interface) of the object.
Chapter 20 Using cfobject to Invoke Component Objects
tag. It also displays the object's supported
cfobject
fails.)
Need help?
Do you have a question about the COLDFUSION 5-DEVELOPING and is the answer not in the manual?