home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #18 / NN_1992_18.iso / spool / comp / windows / x / motif / 5675 < prev    next >
Encoding:
Text File  |  1992-08-18  |  1.2 KB  |  44 lines

  1. Newsgroups: comp.windows.x.motif
  2. Path: sparky!uunet!s5!is1.is.morgan.com!is.morgan.com!andyc
  3. From: andyc@is.morgan.com (Andrew Coad)
  4. Subject: Motif, WCL and C++
  5. Message-ID: <1992Aug18.114822@is.morgan.com>
  6. Sender: news@is.morgan.com
  7. Nntp-Posting-Host: is5
  8. Organization: Morgan Stanley - IS
  9. Date: Tue, 18 Aug 1992 15:48:22 GMT
  10. Lines: 32
  11.  
  12. I have been using wcl 2.2 to call C++ methods from motif widgets. The doc says
  13. that wcl 2.2 has direct method support but I am seeing the perennial *this*
  14. pointer problem. Does anyone have experience with this (sic). This is what I
  15. am doing:
  16.  
  17.     Resource file:
  18.     app*list.wcCallback:        ListView::setWidgetId()
  19.     etc, etc
  20.  
  21.     Source code:
  22.     ListView::setWidgetId(Widget w, XtPointer clientData,
  23.                         XtPointer callData) {
  24.         ....
  25.         fprintf(stderr, "This Object: %x\n", this);
  26.         /* This gives me Widget w, NOT this */
  27.  
  28.         fprintf(stderr, "Widget ID: %x\n", w);
  29.         /* this gives me clientData, NOT w! */
  30.  
  31.         etc, }
  32.  
  33. The problem is the same as wcl 1.06 et al. the stack is skewed beacause there
  34. is no this pointer. Is wcl 2.2 supposed to take care of this problem? Or am i
  35. mis-understanding?
  36.  
  37. Comments appreciated.
  38.  
  39. Andrew Coad
  40. Morgan Stanley
  41. New York
  42. (212) 703-2379
  43.  
  44.