Skip to content

invalid command name "tk::MenuDup"

4 messages · Uwe Ligges, habasque, Brian Ripley

#
Hi to all,

I'm developping an user interface in TCL/TK but in some computers this error
occurs :
<Tcl> invalid command name "tk::MenuDup"

when the user runs :
tm <- tktoplevel(height=500,width=800)
topMenu <- tkmenu(tm)
tkconfigure(tm,menu=topMenu)

i don't understand why this code works on my computer and is not running on
other user environment ?

thanks,


--
View this message in context: http://r.789695.n4.nabble.com/invalid-command-name-tk-MenuDup-tp4091092p4091092.html
Sent from the R help mailing list archive at Nabble.com.
#
On 21.11.2011 11:00, habasque wrote:
Different versions of tcl/tk?

Uwe Ligges
#
It seems that tcl/tk doesn't work fine on R-2.11 version.

Anyone can run this code to confirm ?

[CODE]require(tcltk)
tt <- tktoplevel()
topMenu <- tkmenu(tt)
tkconfigure(tt,menu=topMenu)
fileMenu <- tkmenu(topMenu,tearoff=FALSE)
tkadd(fileMenu,"command",label="Quit",command=function() tkdestroy(tt))
tkadd(topMenu,"cascade",label="File",menu=fileMenu)
tkfocus(tt)[/CODE]

Thanks,

--
View this message in context: http://r.789695.n4.nabble.com/invalid-command-name-tk-MenuDup-tp4091092p4094860.html
Sent from the R help mailing list archive at Nabble.com.
#
On Tue, 22 Nov 2011, habasque wrote:

            
As the posting guide says, there is no such version, and this list is 
only for current versions of R: you were asked to upgrade *before* 
posting.

But it does work correctly in R 2.11.0 on my Linux box.

This is all about the version of Tcl/Tk, as someone told you 
yesterday.  Tcl/Tk is not part of R, even if on the binary platforms 
we provide a build (which on Windows has not changed since R 2.7.0). 
But we don't know what your platform is, as you ignored the posting 
guide.