Event un-wiring?

This is a discussion on Event un-wiring? within the Windows Programming forums, part of the Platform Specific Boards category; Hello. Can someone tell me what is the procedure of un-wiring an event handler from an event (if there is ...

  1. #1
    Registered User
    Join Date
    Jul 2003
    Posts
    32

    Event un-wiring?

    Hello.

    Can someone tell me what is the procedure of un-wiring an event handler from an event (if there is such a thing)?

    You wire a handler to an event with the syntax:
    Code:
    eventSource.someEvent += new SomeEventHandler(someMethod);
    Thank you.

  2. #2
    Registered User
    Join Date
    Jul 2003
    Posts
    32
    There is. You need to keep a refence to the EventHandler object that you added to the Event and you unwire that object with the -= operator on the reference.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Lame null append cause buffer to crash
    By cmoo in forum C Programming
    Replies: 8
    Last Post: 12-29-2008, 02:27 AM
  2. Event driven thread programming
    By jaxen in forum C++ Programming
    Replies: 6
    Last Post: 11-22-2006, 07:46 AM
  3. XWindows- Close window event?
    By Exile in forum Linux Programming
    Replies: 8
    Last Post: 01-09-2005, 09:39 PM
  4. Replies: 2
    Last Post: 09-22-2003, 01:47 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21