Incorrect. Quoting the ColdFusion documentation:
The cfloop collection attribute lets you loop over a structure or a COM/DCOM
collection object
----- Original Message -----
From: "Richard Kuryk" <[EMAIL PROTECTED]>
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Monday, November 19, 2001 3:21 PM
Subject: RE: CFOBJECT related question
> You will not be able to use CF to loop over a com object. You must use
that
> objects method's ie:
>
> <CFSCRIPT>
> entitiesIterator = entitiesCollection.iterator();
> while ( entitiesIterator.hasNext() ) {
> ......
> }
> </CFSCRIPT>
>
> Or if you know the size of the collection you can use a simple for loop.
CF
> isn't going to know how to process a COM object.
>
>
> Rich
>
>
> > -----Original Message-----
> > From: Bruce Sorge [mailto:[EMAIL PROTECTED]]
> > Sent: Monday, November 19, 2001 3:50 PM
> > To: CF-Talk
> > Subject: CFOBJECT related question
> >
> >
> > I have created an object in my Application.cfm,
> > (<cfobject type="COM" class="BHCSPortalUserObjects.CEntities"
> > name="entitiesCollection" action="CREATE">)
> > and I can access any object property in the Application.cfm.
> > What I am trying to do now is to access the collection in
> > other templates. For instance, I have this code:
> >
> > <select name="EntityID">
> > <cfloop collection="#entitiesCollection#" item="Names">
> > <cfoutput>
> > <option value="#Names.EntityID#">#Names.EntityName#
> > </cfoutput>
> > </cfloop>
> > </select>
> >
> > What I get is this:
> > An error occurred while evaluating the expression:
> > "#entitiesCollection#"
> >
> >
> > I have been looking through my documentation, and I cannot
> > find out why I cannot access the collection is another page
> > below the application.cfm.
> >
> > Any thoughts? We have not been working a whole lot with COM
> > objects here, but we are going to be relying on them more and
> > more in the near future.
> >
> > Thanks,
> >
> >
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
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
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists