home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.windows.x.motif
- Path: sparky!uunet!s5!is1.is.morgan.com!is.morgan.com!andyc
- From: andyc@is.morgan.com (Andrew Coad)
- Subject: Motif, WCL and C++
- Message-ID: <1992Aug18.114822@is.morgan.com>
- Sender: news@is.morgan.com
- Nntp-Posting-Host: is5
- Organization: Morgan Stanley - IS
- Date: Tue, 18 Aug 1992 15:48:22 GMT
- Lines: 32
-
- I have been using wcl 2.2 to call C++ methods from motif widgets. The doc says
- that wcl 2.2 has direct method support but I am seeing the perennial *this*
- pointer problem. Does anyone have experience with this (sic). This is what I
- am doing:
-
- Resource file:
- app*list.wcCallback: ListView::setWidgetId()
- etc, etc
-
- Source code:
- ListView::setWidgetId(Widget w, XtPointer clientData,
- XtPointer callData) {
- ....
- fprintf(stderr, "This Object: %x\n", this);
- /* This gives me Widget w, NOT this */
-
- fprintf(stderr, "Widget ID: %x\n", w);
- /* this gives me clientData, NOT w! */
-
- etc, }
-
- The problem is the same as wcl 1.06 et al. the stack is skewed beacause there
- is no this pointer. Is wcl 2.2 supposed to take care of this problem? Or am i
- mis-understanding?
-
- Comments appreciated.
-
- Andrew Coad
- Morgan Stanley
- New York
- (212) 703-2379
-
-