Path: utzoo!attcan!lsuc!sq!sqwest!brad From: brad@sqwest.sq.com (Brad Might) Newsgroups: comp.lang.c++ Subject: XView with C++ Message-ID: <1990Mar22.180658.26754@sqwest.sq.com> Date: 22 Mar 90 18:06:58 GMT Organization: SoftQuad Inc. Lines: 36 we are using c++ and xview. what we have done for notifier procs is to make the proc a static function rather than a method. we store our object as CLIENT_DATA which the notifier proc uses when it gets called. roughly: // this is all c++ in the same file // example is a button item on a panel static void buttonNotifyProc(Panel_item item, Event *) { ((Button *)xv_get(item, PANEL_CLIENT_DATA))->pushed(); } // button constructor Button::Button() { xv_create(Panel, PANEL_BUTTON, PANEL_LABEL_STRING, label, PANEL_CLIENT_DATA, this, PANEL_NOTIFY_PROC, buttonNotifyProc, 0); } void Button::pushed() { // do whatever !!! } -- Brad Might brad@sq.com SoftQuad Inc. utzoo!sq!brad (604) 585-1999 Not responsible for any warranties explicit or implied.