Displaying 1 result from an estimated 1 matches for "list_par".
Did you mean:
list_var
2002 May 29
2
Tcl/tk , question about the environment of the call
...the inner function browse the
objects in the outer function.
#######################
tk1 <- function() {
tk2 <- function() {
inner <- 3
list2 <- ls()
#list objects in fuction tk2
print("**** inner objects ****")
print(list2)
#list objects in fuction tk1
list_parent <- ls(parent.frame())
print("**** outer objects ****")
print(list_parent)
}
tt <- tktoplevel()
outer <- 1
tkpack(tkbutton(tt,text="push",command=tk2()))
tk2()
}
#######################
there's a call of tk2 inside tk1, so when I run tk1(), it gives the...