MACROMEDIA COLDFUSION MX 61-CFML Reference page 255

Cfml reference
Hide thumbs Also See for COLDFUSION MX 61-CFML:
Table of Contents

Advertisement

Attribute
Req/Opt
context
Optional
server
Required if
context =
"Remote"
Example
<h3>cfobject (COM) Example</h3>
<!--- Create a COM object as an inproc server (DLL). (class = prog-id)--->
<cfobject action = "Create"
type = "COM"
class = Allaire.DocEx1.1
name = "obj">
<!--- Call a method. Methods that expect no arguments should be called
using empty parentheses. --->
<cfset obj.Init()>
<!--- This is a collection object. It should support, at a minimum:
Property : Count
Method : Item(inarg, outarg)
and a special property called _NewEnum
--->
<cfoutput>
This object has #obj.Count# items.
<br> <HR>
</cfoutput>
<!--- Get the 3rd object in the collection. --->
<cfset emp = obj.Item(3)>
<cfoutput>
The last name in the third item is #emp.lastname#.
<br> <HR>
</cfoutput>
<!---Loop over all the objects in the collection.--->
<p>Looping through all items in the collection:
<br>
<cfloop
collection = #obj#
item = file2>
<cfoutput>Last name: #file2.lastname# <br></cfoutput>
</cfloop>
Default Description
• inproc
• local
• remote
On Windows: If not specified, uses Registry setting.
Server name, using Universal Naming Convention (UNC) or
Domain Name Serve (DNS) convention, in one of these
forms:
• \\lanserver
• lanserver
• http://www.servername.com
• www.servername.com
• 127.0.0.1
cfobject: COM object
255

Advertisement

Table of Contents
loading

This manual is also suitable for:

Coldfusion mx

Table of Contents