Quickest way to reimplement an interface

If I make changes to an interface, what is the quickest way to refresh all of the classes using that interface? Is there a quick way that I can set the interfaces of multiple classes at once, also?

Thanks

Put them in an Array as a Variant or dictionary during the Construct, and make a function in the classes to update. Then loop through the array calling

For i as Integer = 0 to ArrayName.Ubound
Classname(ArrayName(i)).updateMethodName
next i

The quickest way to set the interfaces with minimal code would be to implement a memberset of the initial class and dynamically create them at runtime.

If you need a demo, I’m sure I could whip one up :slight_smile:

[quote=57022:@Matthew Combatti]Put them in an Array as a Variant or dictionary during the Construct, and make a function in the classes to update. Then loop through the array calling

For i as Integer = 0 to ArrayName.Ubound
Classname(ArrayName(i)).updateMethodName
next i

The quickest way to set the interfaces with minimal code would be to implement a memberset of the initial class and dynamically create them at runtime.

If you need a demo, I’m sure I could whip one up :-)[/quote]
Okay thanks

Oliver, did you mean to ask, “When I add a new method to a class interface, what is the fastest way to add that new method to all classes that implement that interface?”

If so, the answer is “copy and paste the method”. :slight_smile:

@Matthew Combatti - is that IDE Script code you’re suggesting to use there? I didn’t know IDE Scripting had a “updateMethodName” method. Otherwise, your code doesn’t make sense to me, or I do not understand the question.

I think Matt was answering the question, “What is the fastest way to propagate a message to a group of classes?”.