Thread: Event un-wiring?

  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, 03:27 AM
  2. Event driven thread programming
    By jaxen in forum C++ Programming
    Replies: 6
    Last Post: 11-22-2006, 08:46 AM
  3. XWindows- Close window event?
    By Exile in forum Linux Programming
    Replies: 8
    Last Post: 01-09-2005, 10:39 PM
  4. Replies: 2
    Last Post: 09-22-2003, 01:47 PM