Article View: comp.windows.x
Article #38370Re: C++ and callbacks:
From: Keith Lomax
Date: Tue, 03 May 1994 13:28
Date: Tue, 03 May 1994 13:28
15 lines
1787 bytes
1787 bytes
Glenn M. Poorman wrote: >>Unfortunately, the only way around this problem (as far as I know) is to either >>use the "this" pointer as the client_data (as you mentioned above) or write >>your own mechanism for registering member functions as callbacks. In the Nov-Dec 93 issue of The X Journal, J. Darren Jones suggested an alternative approach to the 2 functions per callback mechanism (D Young's method). The article proposes a Callback class that acts as the interpreter between the GUI components and the Intrinsics. Such a class provides the protocol the GUI developer wants and the protocol expected by Xt. An implementation is also provided. I can not vouch for the suitability of Mr Jones's approach, but it is a very interesting article. -- Keith Lomax (Independent) e-mail: keith@lts.sel.alcatel.de #include <std/disclaimer.H> with STD_DISCLAIMER; use STD_DISCLAIMER; "We can be heroes, just for one day" - Heroes, D Bowie
Technical Details
Message-ID:
<1994May3.132837.20007@lts.sel.alcatel.de>Path:
arc1-ca.pugleaf.net!bga.com!news.sprintlink.net!hookup!news.moneng.mei.com!howland.reston.ans.net!xlink.net!slsv6bt!keithReferences:
<pauld.767898877@sarge> <2q5f97INNt6o@eccdb1.pms.ford.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 109fba,ad5a39011a2d3d26 X-Google-Attributes: gid109fba,public X-Google-Thread: 103734,ad5a39011a2d3d26 X-Google-Attributes: gid103734,public X-Google-Thread: 10ba33,ad5a39011a2d3d26 X-Google-Attributes: gid10ba33,public X-Google-ArrivalTime: 1994-05-03 06:54:07 PST Newsgroups: comp.windows.x,comp.lang.c++,gnu.g++.help Path: arc1-ca.pugleaf.net!bga.com!news.sprintlink.net!hookup!news.moneng.mei.com!howland.reston.ans.net!xlink.net!slsv6bt!keith From: keith@us-es.sel.de (Keith Lomax) Subject: Re: C++ and callbacks: Message-ID: <1994May3.132837.20007@lts.sel.alcatel.de> Sender: news@lts.sel.alcatel.de Organization: SEL-Alcatel LTS Dept. US/ES References: <pauld.767898877@sarge> <2q5f97INNt6o@eccdb1.pms.ford.com> Date: Tue, 3 May 94 13:28:37 GMT Lines: 15