Skip to content

tk problem with R 2.2.0 on wine/linux

3 messages · Hin-Tak Leung, Philippe GROSJEAN

#
Actually I am trying to run sciview-R and encounted some problems with
tk, and I thought I'll check the basic library(tcltk) functionallity,
just to be sure. Anybody seen that  '[tcl] bad window path name ".1".'
message before?

Prof. Philippe Grosjean: yes, I have managed to load most of
sciview-R under Wine, except the tcltk library!

===================
R : Copyright 2005, The R Foundation for Statistical Computing
Version 2.2.0  (2005-10-06 r35749)
ISBN 3-900051-07-0

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

   Natural language support but running in an English locale

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for a HTML browser interface to help.
Type 'q()' to quit R.

[Previously saved workspace restored]

 > library(tcltk)
Loading Tcl/Tk interface ... done
 > demo(tkdensity)


         demo(tkdensity)
         ---- ~~~~~~~~~

Type  <Return>   to start :

 > require(tcltk) || stop("tcltk support is absent")
[1] TRUE

 > require(graphics)
[1] TRUE

 > require(stats)
[1] TRUE

 > local({
     y <- NULL
     xlim <- NULL
     size <- tclVar(50.000000)
     dist <- tclVar(1.000000)
     kernel <- tclVar("gaussian")
     bw <- tclVar(1.000000)
     bw.sav <- 1.000000
     replot <- function(...) {
         if (is.null(y))
             re .... [TRUNCATED]
Error in structure(.External("dotTclObjv", objv, PACKAGE = "tcltk"), 
class = "tclObj") :
         [tcl] bad window path name ".1".
 > demo(tkttest)


         demo(tkttest)
         ---- ~~~~~~~

Type  <Return>   to start :

 > require(tcltk) || stop("tcltk support is absent")
[1] TRUE

 > require(stats)
[1] TRUE

 > local({
     dialog.t.test <- function() {
         tt <- tktoplevel()
         tkwm.title(tt, "t test")
         x.entry <- tkentry(tt, textvariable = xvar)
         y.entry <- tkentry(tt, textvariable = yvar)
         alt <- tclVar("two.sided")
         d .... [TRUNCATED]
******************************************************
  The source for this demo can be found in the file:
  C:/PROG~FBU/R/R-2_~MVR.0/library/tcltk/demo/tkttest.R
******************************************************
Error in structure(.External("dotTclObjv", objv, PACKAGE = "tcltk"), 
class = "tclObj") :
         [tcl] bad window path name ".2".
 >
#
Hello,

This is interresting. I think you did the big part of the job if 
SciViews-R is starting. tcltk is used independently from the rest of 
SciViews-R, for some dialog boxes and for R Commander. I think you 
should try now to run tcltk on the plain RGui.exe under wine. I guess it 
will eliminate various possible interferences... and then, if you 
succeed, go back to RGui + SciViews-R + tcltk under Wine.

Unfortunatelly, I cannot help you much here (except if I have some code 
to change for a better behaviour of SciViews-R under Wine).

For the use of tcltk with RGui.exe under Wine, the best person to 
contact is the tcltk maintainer, that is, Peter Dalgaard.

Best,

Philippe Grosjean

P.S.: What about the performances of R / SciViews-R under Wine???

..............................................<??}))><........
  ) ) ) ) )
( ( ( ( (    Prof. Philippe Grosjean
  ) ) ) ) )
( ( ( ( (    Numerical Ecology of Aquatic Systems
  ) ) ) ) )   Mons-Hainaut University, Pentagone (3D08)
( ( ( ( (    Academie Universitaire Wallonie-Bruxelles
  ) ) ) ) )   8, av du Champ de Mars, 7000 Mons, Belgium
( ( ( ( (
  ) ) ) ) )   phone: + 32.65.37.34.97, fax: + 32.65.37.30.54
( ( ( ( (    email: Philippe.Grosjean at umh.ac.be
  ) ) ) ) )
( ( ( ( (    web:   http://www.umh.ac.be/~econum
  ) ) ) ) )          http://www.sciviews.org
( ( ( ( (
..............................................................
Hin-Tak Leung wrote:
#
Philippe Grosjean wrote:
This is what I am trying to do - it seems to be some interaction to
the windows manager. I tried running "library(tcltk); demo(tkdensity)"
under native R on linux - it works, but on exit from R, I get a bunch of 
warning messages like this:

Warning messages:
1: X11 protocol error: BadWindow (invalid Window parameter)
2: X11 protocol error: BadWindow (invalid Window parameter)
3: X11 protocol error: BadWindow (invalid Window parameter)
4: X11 protocol error: BadWindow (invalid Window parameter)
5: X11 protocol error: BadWindow (invalid Window parameter)
6: X11 protocol error: BadWindow (invalid Window parameter)
7: X11 protocol error: BadWindow (invalid Window parameter)
8: X11 protocol error: BadWindow (invalid Window parameter)
9: X11 protocol error: BadWindow (invalid Window parameter)
10: X11 protocol error: BadWindow (invalid Window parameter)

So it seems the tcltk is doing something not quite correct, and
the problem is serious enough under wine to stop the whole thing.
It is quite useable - I think screen refreshes and updates are 
significantly slower, so don't expect to do animations, but the Rgui
and Rconsole are not noticeably slower than native.