This is the mail archive of the insight@sources.redhat.com mailing list for the Insight project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Cygwin 1.5.5-1: Tk support for 'plot' command and widget?


It turns out the plot command is created the program's own code; I
had missed that. Inspection of the C code called when the plot
command is invoked shows that

http://cvs.sourceforge.net/viewcvs.py/savi/savi-dev/src/tkPlot.c

tkPlot.c's:

  plotPtr->pixelsPerMM = WidthOfScreen(Tk_Screen(new));
  plotPtr->pixelsPerMM /= WidthMMOfScreen(Tk_Screen(new));

crashes the program, and if those are commented out, so does the
later:

Tk_ConfigureWidget(interp, tkwin, configSpecs, argc, argv, (char *)
plotPtr, flags)

How does Insight Tk do screen handling? Is WidthOfScreen et al.
supported?

thanks,

L.

On Sun, 18 Jan 2004, Lloyd Wood wrote:

> Date: Sun, 18 Jan 2004 23:14:14 +0000 (GMT)
> From: Lloyd Wood <eep1lw@eim.surrey.ac.uk>
> To: insight@sources.redhat.com
> Subject: Cygwin 1.5.5-1: Tk support for 'plot' command and widget?
>
> (I was directed to insight from the cygwin list.)
>
> I've been maintaining and enhancing Tcl/Tk code that uses a plot
> command for a creating and manipulating a vector plot widget (rather
> than a canvas bitmap or image widget). That code has worked fine under
> Tcl/Tk 7/4 and 8.x on e.g. Solaris and Linux for the past eight years,
> but I find that just issuing the plot command of the form:
>
> plot $name -bg black -height 300 -width 300
>
> causes Tcl/Tk 8.4 (tcltk 20030901-1, says cygcheck) under an
> just-installed-yesterday Cygwin 1.5.5-1 to die -- while Tcl/Tk 8.4
> under Redhat 7.2 draws the widget and window just fine.
>
> A refresher look through Tk's man pages shows the canvas command, but
> not a plot command. Which is puzzling... so how did this plot command
> ever work? Has this code been relying on an undocumented command in
> Tcl/Tk under unix all this time? Is Tcl/Tk 8.4 under Cygwin different
> from under unix in handling this? (The Cygwin Tk does live outside of
> X, and I don't know what that leads to.)
>
> The code to build the window that I'm describing is fisheye(build) at:
> http://cvs.sourceforge.net/viewcvs.py/savi/savi-dev/tcl/fisheye.tcl
> which calls simple procedures in:
> http://cvs.sourceforge.net/viewcvs.py/savi/savi-dev/tcl/utils.tcl
>
> This is part of SaVi: http://savi.sourceforge.net/
> and a 17 January SaVi snapshot that compiles cleanly under Cygwin
> and gcc 3.3.1 can be downloaded from:
> http://www.ee.surrey.ac.uk/Personal/L.Wood/software/SaVi/src/unreleased/
>
> A similar coverage window in the same application that uses a canvas
> bitmap widget has no problems under Cygwin; canvas is fine, and canvas
> is in the Tk documentation and man pages just as you would expect.
>
> Pointers on what I'm doing wrong and my mistaken assumptions much
> appreciated. The Tcl/Tk release that cygwin installs doesn't appear
> debuggable; tips on debugging Tcl/Tk under Cygwin also welcome.
>
> thanks,
>
> L.

<http://www.ee.surrey.ac.uk/Personal/L.Wood/><L.Wood@ee.surrey.ac.uk>


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]