Adobe 38043740 - ColdFusion Standard - Mac Development Manual page 1178

Developing applications
Hide thumbs Also See for 38043740 - ColdFusion Standard - Mac:
Table of Contents

Advertisement

DEVELOPING COLDFUSION 9 APPLICATIONS
Using Web Elements and External Objects
In this example, if the object changes the value of x, it now contains a value other than 23.
Calling nested objects
ColdFusion supports nested (scoped) object calls. For example, if an object method returns another object, and you
invoke a property or method on that object, you can use the syntax in either of the following examples:
<cfset prop = myObj.X.Property>
or
<cfset objX = myObj.X>
<cfset prop = objX.Property>
Getting started with COM and 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 type information to correctly set up the arguments on call invocations. Any
ambiguity in the object data types can lead to unexpected behavior.
In ColdFusion, 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 could appear on the web server
desktop, not on the client desktop. This behavior can take up ColdFusion server threads and prevent further web server
requests from being serviced.
ColdFusion can call Inproc, Local, or Remote COM objects. The attributes specified in the
which type of object is called.
COM requirements
To use COM components in your ColdFusion application, you need at least the following items:
• The COM objects (typically DLL or EXE files) that you want to use in your ColdFusion application pages. Ensure
that these components implement the IDispatch interface, and therefore allow late binding.
• Microsoft OLE/COM Object Viewer, available from Microsoft. This tool lets you view registered COM objects.
Object Viewer lets you view the class information of an object so that you can properly define the
for the
tag. It also displays the interfaces the object supports, so you can discover the properties and
cfobject
methods (for the IDispatch interface) of the object.
Registering the object
After you acquire an object, register it with Windows for ColdFusion (or any other program) to find it. Some objects
have setup programs that register objects automatically, while others require manual registration.
You can register Inproc object servers (.dll or .ocx files) manually by running the regsvr32.exe utility using the
following form:
regsvr32 c:\path\servername.dll
You typically register Local servers (.exe files) either by starting them or by specifying a command-line parameter, such
as the following:
C:\pathname\servername.exe -register
Last updated 1/20/2012
1173
tag determine
cfobject
attribute
class

Advertisement

Table of Contents
loading

This manual is also suitable for:

Coldfusion 9

Table of Contents