Skip to content
Prev 49662 / 63421 Next

Is the tcltk failure in affylmGUI related to R bug 15957

Seems unlikely that that particular bug is involved. I seem to recall some change related to inadvertent variable capture in .TkRoot$env (?). At any rate, we currently have
<environment: R_EmptyEnv>

which used to be
<environment: R_GlobalEnv>

as a result, this won't work any more because R_EmptyEnv has no operators and functions in it:
Error in eval(substitute(expr), envir, enclos) : 
  could not find function "<-"

and consequently, you conk out at

   Try(n <- evalq(TclVarCount <- TclVarCount + 1, .TkRoot$env))

which presumably needs to be recoded in the same way as the current code in tclVar():
function (init = "") 
{
    n <- .TkRoot$env$TclVarCount <- .TkRoot$env$TclVarCount + 
        1L
    name <- paste0("::RTcl", n)
    l <- list(env = new.env())
    assign(name, NULL, envir = l$env)
    reg.finalizer(l$env, function(env) tcl("unset", ls(env)))
    class(l) <- "tclVar"
    tclvalue(l) <- init
    l
}

(The whole thing looks a bit odd: Your function clones a fair bit of tclVar, wrapping each line in Try() for no apparent reason (or?), with the apparent purpose of doing something that seems quite similar to what tclArray() already does...)

-pd