[ESS] TclTk problems with tkentry()/limmaGUI under XEmacs/ESS

Dr Mike Waters michael.waters at dtn.ntl.com
Tue Nov 30 21:20:57 CET 2004


Andreas,

I was wondering whether the R binary includes the relevant additional
information, which is made available to the Rgui interface, but not to the
XEmacs/ESS accessed Rterm (which would explain things working in the former
and not in the latter). The paragraph that might be most relevant from the
link I posted is, I think:

"Once you have installed ActiveTcl and made a note of which directory you
installed it in, you need to make sure that the Tcl\bin directory (e.g.
C:\Tcl\bin) containing the dynamic librarys (dlls) is included in your Path
environment variable. You also need create a new environment variable,
TCL_LIBRARY (if it doesn't already exist), and set its value to the
directory containing the tcl8.x library (e.g. C:\Tcl\lib\tcl8.4). Finally,
you need to create a new environment variable, MY_TCLTK (if it doesn't
already exist), and set it to a non-empty value (e.g. "yes"). Once this is
complete, you should not only be able to load the tcltk package in R with
require(tcltk), but you should also be able to use additional widgets not
available in the bundled R installation, e.g. to use a drop-down combo box,
you would need to type tclRequire("Iwidgets") after typing require(tcltk)."

So, the above may be taken care of for direct Rgui access, but not via the
Xemacs/ESS route.

HTH

Regards

M


> -----Original Message-----
> From: ess-help-bounces at stat.math.ethz.ch 
> [mailto:ess-help-bounces at stat.math.ethz.ch] On Behalf Of 
> Andreas Quandt
> Sent: 30 November 2004 18:40
> To: Dr Mike Waters; ess-help at stat.math.ethz.ch
> Subject: Re: [ESS] TclTk problems with tkentry()/limmaGUI 
> under XEmacs/ESS
> 
> 
> 
> Dear Mike,
> 
> Thank you first for the quick answer!
> Few seconds before I found a solution. Unfortunatelly I did not 
> understand it completely.
> In later examples on http://www.sciviews.org/_rgui/ is described that 
> for using of |BWidget| and |Iwidgets| packages the line 
> |addTclPath("C:/Tcl/lib") should be added in the R code. I do not know
> why but the same helps in my case.
> After finding this out I added ||"C:/Tcl/lib" to the PATH variable by 
> myself and ran the code again but that did not help. So the 
> setting of 
> the tcl path should be not the problem or?
> I guess that the code example and the limmaGUI contains some 
> part of one 
> of the named packages. But for the code example I do not know 
> where? For 
> my understanding the code example does not contain "advanced" 
> tcltk code. I do not understand why I have to added the line 
> ||addTclPath("C:/Tcl/lib") in the code? In the description of the
> example was also no hint for adding this line to the code.
> So I am a little bit confused and not sure if I am doing 
> something wrong 
> or not?
> I attached the code of the example and hope it helps the 
> expeRts to help 
> me again:
> ||
> |
> 
> require(tcltk)
> tt <- tktoplevel()
> txt <- tktext(tt)
> tkgrid(txt)
> copyText <- function() 
> tkcmd("event","generate",.Tk.ID(txt),"<<Copy>>")
> 
> editPopupMenu <- tkmenu(txt, tearoff=FALSE) 
> tkadd(editPopupMenu, "command", label="Copy <Ctrl-C>",
> command=copyText)
> 
> RightClick <- function(x,y) # x and y are the mouse 
> coordinates { rootx <- as.integer(tkwinfo("rootx",txt)) rooty 
> <- as.integer(tkwinfo("rooty",txt)) xTxt <- 
> as.integer(x)+rootx yTxt <- as.integer(y)+rooty
> tkcmd("tk_popup",editPopupMenu,xTxt,yTxt)
> }
> tkbind(txt, "<Button-3>",RightClick)
> tkfocus(tt)
> 
> 
> 
> Thanks you for the quick help again.
> 
> Best regards
> Andreas
> 
> ______________________________________________
> ESS-help at stat.math.ethz.ch mailing list 
> https://stat.ethz.ch/mailman/listinfo/ess-help
>




More information about the ESS-help mailing list