home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #19 / NN_1992_19.iso / spool / comp / windows / x / 15889 < prev    next >
Encoding:
Internet Message Format  |  1992-08-30  |  2.3 KB

  1. Path: sparky!uunet!haven.umd.edu!darwin.sura.net!jvnc.net!princeton!rutgers!news.cs.indiana.edu!tjones@moose.cs.indiana.edu
  2. From: tjones@moose.cs.indiana.edu (terry jones)
  3. Newsgroups: comp.windows.x
  4. Subject: Problem with dialog widget values in Xaw & Xaw3d.
  5. Message-ID: <1992Aug30.210619.10865@news.cs.indiana.edu>
  6. Date: 31 Aug 92 02:06:11 GMT
  7. Organization: Indiana University, Bloomington
  8. Lines: 61
  9.  
  10. [SPARCstation IPX, X11R5, /bin/cc compiled.]
  11.  
  12.  
  13. I am having some odd behavior when trying to set values in Xaw 
  14. dialog widgets. I am doing this with
  15.  
  16.         static void
  17.         set_dialog_value(w, value)
  18.         Widget w;
  19.         String value;
  20.         {
  21.             Arg arg;
  22.         
  23.             XtSetArg(arg, "value", value);
  24.             XtSetValues(w, arg, 1);
  25.     
  26.             return;
  27.         }
  28.  
  29.  
  30. which works fine. 
  31.  
  32. With 9 dialog boxes (each with a label, a value (assigned with the above), 
  33. and no buttons), things are fine.
  34.  
  35. When I add a 10th dialog widget and give it a label, it too displays
  36. fine.
  37.  
  38. When I add a value to this widget (even ""), the values in most of the
  39. rest of the dialog widgets are suddenly empty (at least they are 
  40. displayed that way). This happens with Xaw3d too, though the set of
  41. disrupted values is different.
  42.  
  43. Worse is to come... I have checked all the values I am passing around
  44. and they all seem fine. I don't *think* I have any memory problems. The
  45. problem I just described is not specific to the particular 10th dialog
  46. widget. I can pick some set of 9, which will work, but then turning on the
  47. 10th one's (whichever this happens to be) value reproduces the problem.
  48.  
  49. If I add
  50.         printf("dialog widget has value '%s'\n", XawDialogGetValueString(w));
  51. to the above function after the XtSetValues() call, the correct strings
  52. are printed for all ten widgets.
  53.  
  54. In case it matters, the dialog boxes live (with two command widgets) in
  55. a form widget in a popup topLevelShell in the shell returned by 
  56. XtAppInitialize.
  57.  
  58.  
  59. I am a complete X novice, so I suspect the problem is mine, but of
  60. course wonder if this is not some sort of memory problem on the other
  61. side of the fence.
  62.  
  63. I'll try to make a small file that reproduces the problem.
  64.  
  65. In the meantime, any suggestions would be appreciated.
  66. Terry Jones.
  67.  
  68.  
  69. P.S. Thanks to those who helped with the resources problem I posted
  70.      the other day. Things now seem to work as advertised.
  71.