Thanks for your generosity, I am studying CF scripts for loops, like
horizontal, and still working on it, thanks

Yippy ki  a


http://www.yippykia.com


Camilo Trevino
Coldfusion Applications Developer
Microsoft Certified System Engineer

Comptia A+ Certified Computer Technician







-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf
Of Hardy Jonck
Sent: Tuesday, February 10, 2004 3:45 AM
To: '[EMAIL PROTECTED]'
Subject: [CFCDev] Iterator classes for Cf script for queries, structs and
lists

Hi All,

Has anyone written Iterators for CF? I did not find any so I wrote my own.
Just in case someone might find this useful (I certainly do!) it is included
and supports the following:

Iterators for:
Queries (Iterate by column or rows)
Lists
Structs (keys, values or key value pairs)

All iterators are used something like this:
var iterator = createObject('component',QueryIterator).init(aQuery,[a Col
Name Or 0 For rows])
while(iterator.hasNext()) {
        nextItem = iterator.next()
}

cfloop pretty much negates the need for iterators, but the for-in loop only
does structs in cfscript. Hence more need for iterators.  <<Iterator.cfc>>
<<ListIterator.cfc>>  <<QueryIterator.cfc>>  <<StructIterator.cfc>>

Cheers
Hardy Jonck
www.gmsonline.co.za



----------------------------------------------------------
You are subscribed to cfcdev. To unsubscribe, send an email
to [EMAIL PROTECTED] with the words 'unsubscribe cfcdev' 
in the message of the email.

CFCDev is run by CFCZone (www.cfczone.org) and supported
by Mindtool, Corporation (www.mindtool.com).

An archive of the CFCDev list is available at www.mail-archive.com/[EMAIL PROTECTED]

Reply via email to