Interesting Event Problem
I am currently developing an application where I have run into an Events problem that maybe someone can help with.
For ease of explanation, I will use this example. I have a collection of commands. Each command is a class and in-turn has a collection of parameters. Each parameter is a class. I have programmed events in both collections to be raised when a command is added/deleted/edited and when a parameter is added/deleted/edited.
On my form I have declared a module-level instance of my commands collection with events. When I add/edit/delete commands from the collection the corresponding events fire without problem. The problem I encounter is that I am unable to add code for the parameters collection events. How can I make the parameter events available on my form?
# 1 Re: Interesting Event Problem
Not sure here if I understood...
You can add a method in your "command" class to add new "parameter", something like
Public sub AddParameter(whataever values you need to pass)
In this way the internal of the "command" class is private, and the container does not have to know anything about. Write all the code in the "command" class
Marco
mstraf at 2007-11-11 17:26:08 >

# 2 Re: Interesting Event Problem
I suppose I should have specified. The "parameter" functions add/edit/delete are in the parameters collection, not the commands collection. The "commands" functions are in the "commands" collection.