PDA

Click to See Complete Forum and Search --> : Implementing support for "For...Each"


gxpark
Aug 16th, 2001, 02:38 PM
Hi,

I don't remember what do I need to do so my custom collection supports the For...Each navigation.

Can anyone point me in the right direction?

Thanks

Edneeis
Aug 16th, 2001, 08:19 PM
Try making a collection class with the Class Builder AddIn thing, it takes care of all that for you.

gxpark
Aug 16th, 2001, 08:50 PM
thanks... that option never crossed my mind (obviously) :)

zeke_wpg
Aug 23rd, 2001, 09:07 PM
The other way is as follows


' Class code
private mcolThings as new collection

public sub NewEnum as IUnkown
set newenum = mcolThings.[NewEnum]
end sub


in the procedure properties, set the newenum id to -4