[R-gui] tk2mclistbox problem

Philippe Grosjean phgrosjean at sciviews.org
Fri Feb 20 09:05:02 CET 2009


Hello,

I am looking at this problem today.
Best,

Philippe Grosjean
..............................................<°}))><........
  ) ) ) ) )
( ( ( ( (    Prof. Philippe Grosjean
  ) ) ) ) )
( ( ( ( (    Numerical Ecology of Aquatic Systems
  ) ) ) ) )   Mons-Hainaut University, Belgium
( ( ( ( (
..............................................................

M. Tempelhagen wrote:
> Hello
> 
> I´m working with the tcltk2 package and everything works fine. But since 
> R 2.7 my tk2mclistboxe produce an "tk application error".
> I try the standard tk2mclistbox example from the tcltk2 documentation
> ############################################################
> tt2 <- tktoplevel()
> mlb <- tk2mclistbox(tt2, width = 55, resizablecolumns = TRUE)
> # Define the columns
> tk2column(mlb, "add", "name", label = "First name", width = 20)
> tk2column(mlb, "add", "lastname", label = "Last name", width = 20)
> tk2column(mlb, "add", "org", label = "Organisation", width = 15)
> tkgrid(mlb)
> # Fill the multicolumn list (we can use a vector, or a matrix of 
> character strings)
> item1 <- c("Bryan", "Oackley", "ChannelPoint")
> items <- matrix(c("John", "Ousterhout", "Scriptics",
>    "Steve", "Miller", "TclTk inc."), ncol = 3, byrow = TRUE)
> tk2insert.multi(mlb, "end", item1)
> tk2insert.multi(mlb, "end", items)
> #### TO DO: bind events
> # Ex: .listbox label bind date <ButtonPress-1> "sortByDate
> # See the example.tcl in .\libs\mclistbox1.02 for a more complex example
> # Create a button to close the dialog box
> but <- tk2button(tt2, text = "OK", width = 10,
>    command = function() tkdestroy(tt2))
> tkgrid(but)
> ############################################################
> 
> whenever I click in one of the columns the following message occurs on 
> the screen
> 
> ################################################################################ 
> 
> unknown option "-state"; must be one of -background, -bd, -bg, 
> -borderwidth, -columnbd, -columnborderwidth, -columnrelief, -cursor, 
> -exportselection, -fg, -fillcolumn, -font, -foreground, -height, 
> -highlightbackground, -highlightcolor, -highlightthickness, 
> -labelanchor, -labelbackground, -labelbd, -labelbg, -labelborderwidth, 
> -labelfg, -labelfont, -labelforeground, -labelheight, -labelimage, 
> -labelrelief, -labels, -relief, -resizablecolumns, -selectbackground, 
> -selectborderwidth, -selectcommand, -selectforeground, -selectmode, 
> -setgrid, -takefocus, -width, -xscrollcommand or -yscrollcommand
>   while executing
> "error "unknown $object \"$opt\"; must be one of $choices""
>   (procedure "::mclistbox::Canonize" line 93)
>   invoked from within
> "::mclistbox::Canonize $w option [lindex $args 0]"
>   (procedure "::mclistbox::WidgetProc" line 211)
>   invoked from within
> "::mclistbox::WidgetProc .1.1 cget -state"
>   ("eval" body line 1)
>   invoked from within
> "eval ::mclistbox::WidgetProc {.1.1} $command $args"
>   (procedure ".1.1" line 1)
>   invoked from within
> "$w cget -state"
>   (procedure "tk::ListboxBeginSelect" line 18)
>   invoked from within
> "tk::ListboxBeginSelect [::mclistbox::convert .1.1.framelastname.listbox 
> -W] [[::mclistbox::convert .1.1.framelastname.listbox -W] index 
> @[::mclistbox:..."
>   invoked from within
> "if {[winfo exists [::mclistbox::convert .1.1.framelastname.listbox -W]]} {
>   tk::ListboxBeginSelect [::mclistbox::convert 
> .1.1.framelastname.listbox -W..."
>   (command bound to event)  
> #################################################################################### 
> 
> 
> and I have to skip the message to continue. This problem occurs with R 
> 2.7 & 2.8 on Windows XP and Windows Vista.
> So here are my questions
> 1. Is there any option to switch off the message permanently ?
> 2. Does anybody know how to solve the problem, because I don´t want to 
> edit all my applications
> 
> best regards
> Marcel
> 
> _______________________________________________
> R-SIG-GUI mailing list
> R-SIG-GUI at stat.math.ethz.ch
> https://stat.ethz.ch/mailman/listinfo/r-sig-gui



More information about the R-SIG-GUI mailing list