Loading ...
Sorry, an error occurred while loading the content.

!WARNING! to VB developers using events

Expand Messages
  • Torben Wölm
    Using the Implements keyword to implement the interface of another class, does *not* allow implementation of the class events. What this means is, that you
    Message 1 of 1 , Oct 2, 2001
    • 0 Attachment
      Using the "Implements" keyword to implement the interface of another class,
      does *not* allow implementation of the class' events.

      What this means is, that you can not create a mock replacement of a class
      using events.

      http://support.microsoft.com/support/kb/articles/Q172/3/29.asp

      I was not aware of this, and as a consequence I've used a full day creating
      a mock environment that was utterly useless.

      The error is a run-time error. So you will not be notified before you can
      compile and run the entire mock-system surrounding the class you want to
      test.

      And as you see from the "Support"-article, there is no hope. You should use
      manual callback-implementations instead.

      This all happened because I wanted to make a test environment for a legacy
      system.

      I hope this will save somebody's time.

      Arrrgh.

      Best wishes,
      Torben
    Your message has been successfully submitted and would be delivered to recipients shortly.