home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #19 / NN_1992_19.iso / spool / comp / windows / x / motif / 5961 < prev    next >
Encoding:
Internet Message Format  |  1992-09-02  |  3.5 KB

  1. Xref: sparky comp.windows.x.motif:5961 comp.windows.x.intrinsics:231 comp.windows.x:16060
  2. Newsgroups: comp.windows.x.motif,comp.windows.x.intrinsics,comp.windows.x
  3. Path: sparky!uunet!atinc!root
  4. From: root@atinc.uucp (Operator)
  5. Subject: form attachment problem
  6. Message-ID: <1992Sep2.193705.8314@atinc.uucp>
  7. Organization: atinc.com
  8. Date: Wed, 2 Sep 1992 19:37:05 GMT
  9. Lines: 83
  10.  
  11. I have implemented a widget using X toolkit Intrinsics.  I've tested this widget
  12. under the Athena widget set (Xaw) and HP widget set (Xw), using their implementation
  13. of form widget class as the parent, with no problems.  Since, the target application
  14. development envir. is Motif, I core dump using form attachments of more than
  15. 2 sides.  That is, if a rubber the widget with any 2 sides attached, there is
  16. no problem, but attaching the 3rd and/or 4th side, I get a core dump.  The core
  17. dump occurs when making the XtCreateManagedWidget() call, with the attachment
  18. resources setup in the arglist.
  19.  
  20. I tried different contraint widgets as its parent, with no problems also. Its just
  21. the form widget thats being nasty.
  22.  
  23. My class record currently looks like this:
  24.  
  25. typedef struct _FooClassRec {
  26.     CoreClassPart               core_class;
  27.     XmPrimitiveClassPart        primitive_class;
  28.     FooClassPart                foo_class;
  29. }FooClassRec;
  30.  
  31. I've even tried not subclassing the primitive_class for Motif, still got the problem.
  32.  
  33. The ClassRec initiialization follows:
  34.  
  35. idefine superclass              (&coreClassRec)
  36.  
  37. FooClassRec fooClassRec = {
  38. /* core_class fields */
  39.     /* superclass               */      (WidgetClass) superclass,
  40.     /* class_name               */      "foo",
  41.     /* widget_size              */      sizeof(FooRec),
  42.     /* class_initialize         */      foo_class_initialize,
  43.     /* class_part_initialize    */      NULL,
  44.     /* class_inited             */      FALSE,
  45.     /* initialize               */      foo_initialize,
  46.     /* initialize_hook          */      NULL,
  47.     /* realize                  */      XtInheritRealize,
  48.     /* actions                  */      foo_actions,
  49.     /* num_actions              */      XtNumber(foo_actions),
  50.     /* resources                */      resources,
  51.     /* num_resources            */      XtNumber(resources),
  52.     /* xrm_class                */      NULLQUARK,
  53.     /* compress_motion          */      TRUE,
  54.     /* compress_exposure        */      TRUE,
  55.     /* compress_enterleave      */      TRUE,
  56.     /* visible_interest         */      FALSE,
  57.     /* destroy                  */      foo_destroy,
  58.     /* resize                   */      foo_resize,
  59.     /* expose                   */      foo_expose,
  60.     /* set_values               */      (XtSetValuesFunc)foo_setvalues,
  61.     /* set_values_hook          */      NULL,
  62.     /* set_values_almost        */      XtInheritSetValuesAlmost,
  63.     /* get_values_hook          */      NULL,
  64.     /* accept_focus             */      XtInheritAcceptFocus,
  65.     /* version                  */      XtVersion,
  66.     /* callback_private         */      NULL,
  67.     /* tm_table                 */      XtInheritTranslations,
  68.     /* query_geometry           */      NULL,
  69.     /* display_accelerator      */      XtInheritDisplayAccelerator,
  70.     /* extension                */      NULL
  71.   },
  72.   {  /* XmPrimitive */
  73.         _XtInherit,
  74.         _XtInherit,
  75.         XtInheritTranslations,
  76.         NULL,
  77.         NULL,
  78.         0,
  79.         NULL
  80.   },
  81.   {
  82.       0
  83.   }
  84. };
  85.  
  86. My question is:
  87.         Do I need to do something special to my widget intrinsics code to behave
  88. properly with Motif?
  89.  
  90.         Platform: SunOS 4.1.1, XR4, Motif1.1.3
  91.  
  92. thankx, ronyd@atinc
  93.  
  94.