Code Comments

Programming Forum and web based access to our favorite programming groups.
For Programmers: Free Programming Magazines | New: Database administration forum
Registration is free! Edit your profileCalendarFind other membersFrequently Asked QuestionsSearch -> 
Post New Thread











Thread
Author

Custom Enumerator in VB6?
Is it possible to create a custom enumerator object in VB6?
I am building a quite complex container object that in general behaves like
a very intelligent collection. I would "like" to be able to use For-Each
outside of the object to enumerate internal items. However, the enumeration
logic for this particular container is much more complex than a normal
collection. So I would like to create a custom enumerator to handle the
movenext, etc. methods like you can in other language implementations.
Something like:

Public Property Get NewEnum() as IUnknown
..
Set NewEnum = MyCustomEnumerator
End Property

Thanks,
Gerald



Report this thread to moderator Post Follow-up to this message
Old Post
Gerald Hernandez
09-28-04 08:55 PM


Re: Custom Enumerator in VB6?
On Tue, 28 Sep 2004 09:53:56 -0600, "Gerald Hernandez"
<Cablewizard@spam_remove@Yahoo.com> wrote:

>Is it possible to create a custom enumerator object in VB6?
>I am building a quite complex container object that in general behaves like
>a very intelligent collection. I would "like" to be able to use For-Each
>outside of the object to enumerate internal items. However, the enumeration
>logic for this particular container is much more complex than a normal
>collection. So I would like to create a custom enumerator to handle the
>movenext, etc. methods like you can in other language implementations.
>Something like:
>
>Public Property Get NewEnum() as IUnknown
>    ...
>    Set NewEnum = MyCustomEnumerator
>End Property
>
>Thanks,
>Gerald


Have a look at the CSuperCollection example in the Collections section
at  http://www.mvps.org/vbvision/

HTH,
Bryan
 ________________________________________
____________________
New Vision Software                   "When the going gets weird,"
Bryan Stafford		              "the weird turn pro."
alpine_don'tsendspam@mvps.org     Hunter S. Thompson -
Microsoft MVP-Visual Basic     Fear and Loathing in LasVegas

Report this thread to moderator Post Follow-up to this message
Old Post
alpine
09-28-04 08:55 PM


Re: Custom Enumerator in VB6?
Perfect! Exactly what I was looking for.

Thank you,
Gerald

"alpine" <alpine_don'tsendspam@mvps.org> wrote in message
 news:7v3jl0hctmbbv4en29h76lkg9or6kvjq2g@
4ax.com...
> On Tue, 28 Sep 2004 09:53:56 -0600, "Gerald Hernandez"
> <Cablewizard@spam_remove@Yahoo.com> wrote:
> 
like 
enumeration 
>
>
> Have a look at the CSuperCollection example in the Collections section
> at  http://www.mvps.org/vbvision/
>
> HTH,
> Bryan
>  ________________________________________
____________________
> New Vision Software                   "When the going gets weird,"
> Bryan Stafford               "the weird turn pro."
> alpine_don'tsendspam@mvps.org     Hunter S. Thompson -
> Microsoft MVP-Visual Basic     Fear and Loathing in LasVegas



Report this thread to moderator Post Follow-up to this message
Old Post
Gerald Hernandez
09-28-04 08:55 PM


Sponsored Links




Last Thread Next Thread Next
Search this forum -> 
Post New Thread

Visual Basic archive

Show a Printable Version Send to friend Email This Page to Someone! subscribe to this thread Receive updates to this thread
Computer Consultants
Programming Jobs
Visual Basic Controls
SQL Server Programming
Webservices
Java Security
Visual Studio
C# Programming
Visual J++
Software engineering
Open source Software
Perl Programming
PHP Programming
ASP Programming
ASP .NET Programming
Visual Basic Programming
Windows Scripting Host
Java Programming
Java Help
Java Beans
VBScript
Cobol
MAC Applications
Unix Programming
Forum Jump:
All times are GMT. The time now is 05:36 PM.

 
Free MCSE Braindumps | Real Estate Topics

Programming forum archive

Copyrights CodeComments.com 2004 - 2006

Powered by vBulletin Copyright 2000-2006 Jelsoft Enterprises Limited.