[R] tcltk crashes with bad color with text widget

Alex Couture-Beil alex at mofo.ca
Tue Oct 17 04:47:36 CEST 2006


Hello

I have been playing with tcl/tk in R 2.4.0 on windows XP and have 
managed to crash R by supplying tcl/tk with an incorrect color.
Is this a bug? is there a way for me to test the color to see if it is a 
valid tcl/tk color, to avoid this?

tt=tktoplevel()
tklabel(parent=tt, text="hello world", foreground="reed")
Error in structure(.External("dotTclObjv", objv, PACKAGE = "tcltk"), 
class = "tclObj") :
        [tcl] unknown color name "reed".
An error is displayed as one would expect, however when I try
tktext(parent=tt, foreground="blaaack")
R crashes, rather than displaying an error as tklabel did.

This, however, does not happen on my FreeBSD machine, which displays an 
error similar to the one for tklabel and does not crash.

Thanks for any help,
Alex Couture-Beil



More information about the R-help mailing list