home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #26 / NN_1992_26.iso / spool / comp / lang / tcl / 1744 < prev    next >
Encoding:
Text File  |  1992-11-06  |  1.9 KB  |  61 lines

  1. Path: sparky!uunet!ogicse!uwm.edu!linac!att!cbnewsm!gah
  2. From: gah@att.com (George A. Howlett)
  3. Newsgroups: comp.lang.tcl
  4. Subject: Re: graph-1.0
  5. Message-ID: <1992Nov5.212044.10157@cbnewsm.cb.att.com>
  6. Date: 5 Nov 92 21:20:44 GMT
  7. Article-I.D.: cbnewsm.1992Nov5.212044.10157
  8. References: <1992Nov5.160948.9001@rock.concert.net>
  9. Sender: news@cbnewsm.cb.att.com (NetNews Administrator)
  10. Reply-To: george.howlett@att.com
  11. Organization: AT&T Bell Laboratories
  12. Lines: 45
  13. X-Newsreader: TIN [version 1.1 PL6]
  14. Nntp-Posting-Host: grenache.cnet.att.com
  15.  
  16. Derrick C. Cole (cole@concert.net) wrote:
  17. : Has anyone successfully added the graph-1.0 widgets to tk2.3 with tclX6.4c?
  18. : I've had 0 luck so far.
  19. : Any and all help will be greatly appreciated!
  20. : Derrick
  21. : -- 
  22. : "4. So-called "decorative floor mats" just flattened cap'n crunch boxes."
  23. :                        -- Top Ten Signs You've Bought A Bad Car
  24. : -----
  25. : Derrick Cole              KC4WEJ              MCNC Center for Communications
  26.  
  27.  
  28. If you have a version of tk2.3 wish that works with extended tclX6.4c, 
  29. you are almost home free. 
  30.  
  31. In the file main.c, simply add the lines 
  32.  
  33.     extern Tcl_CmdProc GraphCmd;
  34.     extern Tcl_CmdProc HypertextCmd;
  35.  
  36. before the main function.
  37.  
  38. And in the main function, after the line
  39.  
  40.     XSetForeground (Tk_Display (w), DefaultGCOfScreen (Tk_Screen (w)),
  41.             BlackPixelOfScreen (Tk_Screen (w)));
  42.  
  43. add the lines
  44.  
  45.     Tcl_CreateCommand (interp, "htext", HypertextCmd, (ClientData) w,
  46.                (Tcl_CmdDeleteProc *)NULL);
  47.     Tcl_CreateCommand (interp, "xygraph", GraphCmd, (ClientData) w,
  48.                (Tcl_CmdDeleteProc *)NULL);
  49.     Tcl_CreateCommand (interp, "barchart", GraphCmd, (ClientData) w,
  50.                (Tcl_CmdDeleteProc *)NULL);
  51.  
  52.  
  53. Replace the main.c in the graph-1.0 distribution with this version.
  54. Edit the Makefile (or Imakefile) adding in the appropiate paths
  55. for the extended Tcl header files and the extended tcl library.
  56. Then simply follow the instructions in the README.
  57.  
  58. --gah
  59.