Skip to content
Prev 869 / 1236 Next

[R-gui] Example using 'after'

Paul Roebuck wrote:
You're a bit on your own there, in the sense that I can't afford
spending hours to figure out the exact way of doing it. However, notice
that the general picture is that callbacks can be R functions so it
could be something like

tkafter("idle", function() {
    tkupdate("idletasks")
    tkwm("minsize", tt,
         tkwinfo("regwidth", tt),
         tkwinfo("regheight", tt))
})

(Notice that there are predefined shortcuts

tkwm(....) for

tcl("wm", ...) etc.)
They're not intended for that, just to hold widget references and
callback, but I don't see any harm in "abusing" them for other purposes.
The general idea was to use ordinary lexical scoping rules, though.