Josh,

I hope you're not running CFMX. A little forewarning though, we
established last week that COM is dead. So everything you are trying to
do is wrong. (please ignore my saracasm)

Ok, first off you should be loading the COM object via <cfobject>

<cfobject type="com" action="connect" class="objNPOptions"
name="myObject">

objNPOptions.item("title") = "title"

would look like this in cfscript:

myObject = myObject.item("title");
myObject = "title";

Basically you just want to move everything on the right to left. Then
reference the variables you create. It's just a matter of writing a few
more lines of code, utilizing on the right side. Unlike most languages,
you'll end up making a bunch of variables to reference your different
methods, instead of just utilizing the one reference.

Hope this makes sense.


Adam Wayne Lehman
Web Systems Developer
Johns Hopkins Bloomberg School of Public Health
Distance Education Division


-----Original Message-----
From: Joshua O'Connor-Rose [mailto:whifflebat@;hotmail.com] 
Sent: Tuesday, November 12, 2002 11:08 AM
To: CF-Talk
Subject: CFOBJECT and conversion from ASP

New to the list. Not to ColdFusion

The contract I'm working on is using NextPage NXT3 to manage documents.
They 
want to do some management of the NextPage environment through the 
ColdFusion system. (Never mind that Verity is better it has been
discussed)

NextPage has provided developers with com objects so that collections
can be 
built by using the objects.

One of these objects is merely used to define options and is created
like 
this

In asp
Set objNPOptions = Server.CreateObject("NextPage.NPOptions")

to create the name value pairs the command is this:

objNPOptions("title") = "Title"

or
objNPOptions.item("title") = "Title"

I've been trying to convert this into cold fusion but my conversion
bombs 
when I attempt the same

<cfset objNPOptions.item("title") = "Title">

Can't use a function on the left side of an assignment. (sigh)

The unfortunate thing is the NPOptions object is required to set the
options 
for other objects like
objSiteAdmin.CreateInfobase objNPOptions, "name", "c:\filename.nfo"

aka in ColdFusion
<cfset objSiteAdmin.CreateInfobase(objNPOptions, "testname", 
"c:\filename.nfo")>

I tried structures and arrays but it seems that NPOptions is an object
that 
the other com objects are expecting

-from the desk of Joshua O'Connor-Rose
-All is good





~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Your ad could be here. Monies from ads go to support these lists and provide more 
resources for the community. http://www.fusionauthority.com/ads.cfm

Reply via email to