Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!rutgers!gatech!ncsuvx!ccpv1.ncsu.edu!rcb From: rcb@ccpv1.ncsu.edu (Randy Buckland) Newsgroups: comp.lang.c++ Subject: Re: Combining event driven and object orient programming Message-ID: <4107@ncsuvx.ncsu.edu> Date: 4 Oct 89 12:38:27 GMT References: <13928@well.UUCP> Sender: news@ncsuvx.ncsu.edu Distribution: all Lines: 10 The best way I have found to handle things like callbacks on events is to create an object "action". I then have subclasses "action_method" and "action_function" which provide method and procedure callback actions. When setting up an event callback, I pass in a pointer to a proper action structure. When the event occurs, the event code calls the "do_it" method of the action object and the specific type of action handles how to perform the function. Randy Buckland rcb@ncsuvx.ncsu.edu