tricky event question.

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

If I have 2 classes ("A" and "B") that inherit from the same base class, and
both override an event handler method HandleMyEvent(..), class "A" has a
hashtable of one or more class "B"'s. When the event is getting thrown,
class "A"'s overriden method HandleMyEvent(...) is catching it just fine, but
the the class "B"'s overriden method HandleMyEvent(...) doesn't seem to be
catching it. How do I get every instance of class "B" to catch the event in
it's overrided method HandleMyEvent(...)?
 
Can we see code?

My guess is you forgot to add a delegate to B.HandlerMyEvent... Overriding
HandleMyEvent isn't enough. You need to subscribe *each instance*.

Alexander
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top