[R] tcltk problem

Karim Mezhoud kmezhoud at gmail.com
Thu Mar 12 08:35:22 CET 2015


Hi,
Here same working example.
http://mcu.edu.tw/~chenmh/teaching/project/r/reference/RTclTkExamples/
Best,
Karim

On Wed, Mar 11, 2015 at 10:41 PM, Erich Neuwirth <
erich.neuwirth at univie.ac.at> wrote:

> OSX 10.10.2
> R 3.1.3
> XQuartz installed.
>
> I am trying to run one of the tcltk demos
> This one works:
>
> tt <- tktoplevel()
> label.widget <- tklabel(tt, text = "Hello, World!")
> button.widget <- tkbutton(tt, text = "Push",
>                           command = function()cat("OW!\n"))
> tkpack(label.widget, button.widget) # geometry manager
>                                     # see Tk-commands
>
>
> But the next one breaks:
> > if(as.character(tcl("info", "tclversion")) >= "8.5") {
> +   # make use of themed widgets
> +   # list themes
> +   as.character(tcl("ttk::style", "theme", "names"))
> +   # select a theme -- here pre-XP windows
> +   tcl("ttk::style", "theme use", "winnative")
> + } else {
> +   # use Tk 8.0 widgets
> + }
> Error in structure(.External(.C_dotTclObjv, objv), class = "tclObj") :
>   [tcl] bad command "theme use": must be configure, map, lookup, layout,
> theme, or element.
>
> What is going wrong here?
>
>
> ______________________________________________
> R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide
> http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>

	[[alternative HTML version deleted]]



More information about the R-help mailing list