>Me and my team are fairly new to the creation of components. We are in the process of creating custom objects that our organization needs.
>Since the objects that we are creating cannot have an Visible interface as they will be used as components we were wondering how to do error handling.
>We created a collection class which has regular collection properties like count
>and uses an array for the items. It has a method ADD that adds the item to the array.
>Now in the object's init method we use the addobject() to create errors collection and the object's methods will use that collection to report errors.
>Is this the right way of doing things or is their an easier way that we should adopt ?
>Mohinder
Yes and no. If you have to query an errors collection, you'll loose the stateless ability of the component. On the other hand, you may not need to use it that way. Look at the COM articles on my web site and my FoxTalk articles (first one is online at
www.pinpub.com) for help.
Craig Berntson
MCSD, Microsoft .Net MVP, Grape City Community Influencer