home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #18 / NN_1992_18.iso / spool / comp / lang / tcl / 1202 < prev    next >
Encoding:
Internet Message Format  |  1992-08-16  |  3.1 KB

  1. Path: sparky!uunet!europa.asd.contel.com!darwin.sura.net!zaphod.mps.ohio-state.edu!magnus.acs.ohio-state.edu!usenet.ins.cwru.edu!news.ysu.edu!psuvm!frmop11!barilvm!vms.huji.ac.il!wisipc.weizmann.ac.il!menora.weizmann.ac.il!dov
  2. Newsgroups: comp.lang.tcl
  3. Subject: wafe strangeties
  4. Message-ID: <1992Aug16.074258.26726@wisipc.weizmann.ac.il>
  5. From: dov@menora.weizmann.ac.il (Dov Grobgeld)
  6. Date: Sun, 16 Aug 1992 07:42:58 GMT
  7. Sender: news@wisipc.weizmann.ac.il
  8. Organization: Weizmann Institute of Science, Computation Center.
  9. X-Newsreader: Tin 1.1 PL4
  10. Lines: 92
  11.  
  12. I have found some strange behaviour with wafe. Some of it might be
  13. widget errors, other might be platform dependant.
  14.  
  15. My system is RS/6000, AIX 3.1.5, tk 2.2, tcl 6.4, wafe 0.92.
  16.  
  17. Consider the following program:
  18.  
  19. --- Beg of file ---
  20. #!/usr/local/bin/perl
  21. $WafeLib = $ENV{'WAFELIB'} || "/usr/lib/X11/wafe";
  22. require "$WafeLib/perl/wafe.pl";
  23.  
  24. $chunkSize= 1000;
  25. open(IN, shift);
  26. while(<IN>) {
  27.     chop;
  28.     ($x,$y)=/(\S+)\s+(\S+)/o;
  29.     $data.= "$x/$y ";
  30.     if (length($data) > $chunkSize) {
  31.         &Xui("append data \"$data \"");
  32.         $data='';
  33.     }
  34. }
  35. &Xui("append data \"$data \"");
  36.  
  37. &UI(<<EOUI);
  38. form f topLevel
  39. plotter p f height 300 width 500
  40. xyLinePlot lp p
  41. axis x p
  42. axis y p vertical true
  43. sV p xAxis x yAxis y
  44. eval xyLinePlotAttachData lp \$data
  45. realize
  46. EOUI
  47.  
  48. while(<>) {
  49.     print;
  50. }
  51. --- End of file ---
  52.  
  53. If $chunkSize is too big (e.g. 5000) I get the following error from wafe:
  54.  
  55.   Wafe(main): Uncomplete command or communication buffer overflow, >% append
  56.   data "...(deleted approx 5000 characters)..."<
  57.  
  58. I guess I could live with this error in this case. Unfortunately I get
  59. the same error message when running xwafemail with the -F flag, which
  60. is much more critical.
  61.  
  62. Now for strangety number 2. If I change the height of the plot to 400
  63. (plotter p f height 400 width 500) and try to plot the following file
  64.  
  65. --- begin file ---
  66. 0 1.25
  67. 1.57 0.63
  68. --- end file ---
  69.  
  70. I get the following error:
  71.  
  72.   Assertion failed: i < ac->num_tics, file  Axis.c, line 387
  73.   IOT trap (core dumped)
  74.  
  75. The error goes away if I change the height of the graph back to 300.
  76.  
  77. The third critical error I found is if I create an empty file and
  78. try to plot it with the command
  79.  
  80.      xplot empty
  81.  
  82. The error message I get is:
  83.  
  84.   X Error of failed request:  BadLength (poly request too large or internal Xlib length error)
  85.     Major opcode of failed request:  65 (X_PolyLine)
  86.     Serial number of failed request:  60
  87.     Current serial number in output stream:  107
  88.  
  89. Again this error is somewhat acceptable in this context. But I also got
  90. the error from the xdesign program when I requested a plot widget.
  91.  
  92. One small complaint. I could nowhere in the documentation find the syntax
  93. for the parameters of xyLinePlotAttachData . I had to resort to reading
  94. source code.
  95.  
  96. --
  97.                                                         ___   ___
  98.                                                       /  o  \   o \
  99. Dov Grobgeld                                         ( o  o  ) o   |
  100. The Weizmann Institute of Science, Israel             \  o  /o  o /
  101. "Where the tree of wisdom carries oranges"              | |   | |
  102.                                                        _| |_ _| |_
  103.  
  104.