home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.c++
- Path: sparky!uunet!haven.umd.edu!darwin.sura.net!mips!odin!gizmo.wpd.sgi.com!dyoung
- From: dyoung@gizmo.wpd.sgi.com (Doug Young)
- Subject: Re: C++ and XtAddEventHandler()
- Message-ID: <1992Jul27.200047.24078@odin.corp.sgi.com>
- Sender: news@odin.corp.sgi.com (Net News)
- Nntp-Posting-Host: gizmo.wpd.sgi.com
- Reply-To: dyoung@sgi.com
- Organization: Silicon Graphics, Inc.
- References: <MeR3L4e00XQGISKrgK@andrew.cmu.edu>
- Date: Mon, 27 Jul 1992 20:00:47 GMT
- Lines: 25
-
- |> Excerpts from netnews.comp.lang.c++: 20-Jul-92 C++ and
- |> XtAddEventHandler() by zhaocuie@iscs.nus.sg
- |> >I'm using C++ to develop a GUI builder based on Motif, Xt, and X11.
- |> >Now I'm facing some problems. I need to call an Xt convienent function
- |> > XtAddEventHandler(_w, event_mask, nonmaskable, proc, client_data)
- |> >to popup Motif popup menus. I wrote the codes as follows:
-
- |> >
- |> > void Simple::postItEventHandler(Widget, XtPointer clientData, XtPointer)
-
- |> >It does not work. The compiler said:
- |> > error: bad argument 4 type for XtAddEventHandler(): void (*) (Widget,
- |> > XtPointer, XtPointer) (XtEventHandler expected)
-
-
- Xt event handlers, after R4, have a fourth argument, Boolean *, which you
- are not including, therefore making the type of your function incorrect.
- Change your function declaration to:
-
- void Simple::postItEventHandler(Widget, XtPointer clientData, XtPointer, Boolean *)
-
- and all should be well.
-
- Doug Young
-
-