home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / comp / windows / x / motif / 8847 < prev    next >
Encoding:
Text File  |  1993-01-26  |  1.6 KB  |  45 lines

  1. Newsgroups: comp.windows.x.motif
  2. Path: sparky!uunet!scifi!watson!minnie.nic.kingston.ibm.com!mag
  3. From: mag@minnie.nic.kingston.ibm.com (Michael Gray)
  4. Subject: Re: mixing motif 1.2 and other widgets
  5. Message-ID: <1993Jan26.122834.47457@watson.ibm.com>
  6. Sender: mag@porsche (Michael Gray)
  7. Date: Tue, 26 Jan 93 12:28:34 GMT
  8. Distribution: comp
  9. References:  <JOERN.93Jan26114337@khym.imf.unit.no>
  10. Organization: IBM Corp., Kingston NY
  11. Lines: 32
  12.  
  13. This really has to do with the fact the Motif 1.2.x depends, unfortunately, on a widget having
  14. an extension class record.  This record should be of type XmBaseClassExtRec.  Fill it in with
  15. all NULL/FALSE/0, etc information...  Then supply its address to the Class record in the extension field.
  16.  
  17. You also may have to Add a Class Initialize function wherin you do some basic initialization like:
  18.  
  19. _XmRegisterConverters();
  20. _XmRegisterPixmapConverters();
  21. _XmInitializeExtensions();
  22.  
  23. Also, you'll need to set the "record_type" field of your extension record to 
  24. XmQmotif.
  25.  
  26. This certainly seems hacky, but I was unable to get any of my widgets to work without all these
  27. girations..
  28.  
  29. Also,  It seems that Motif 1.2.x wants to add translations to your widget, even if you don't want any.
  30. To override this behavior, I added a classPartInitPrehook.  In this function, I set the flags[0] field of the
  31. Extension record to 1;  This keeps motif from adding translations, because it tells motif that it already did.
  32.  
  33. P.S.  This is undoubtedly a completely unorthodox solution.  If there is anyone out there that can
  34.           provide a simpler one, I'd be happy to use it.
  35.  
  36.  
  37. Hope this helps...
  38.  
  39. Regards,
  40.  
  41. Michael Gray
  42. IBM
  43. minnie.nic.kingston.ibm.com
  44.  
  45.