Cleber N.Borges
2016-Oct-12 00:13 UTC
[R] which properly to avoid pointer copy Tcl Tk? 'externalptr'
hello, I'm trying to disable an tkentry widget with a tkcheckbutton using an R function via the command flag. but I get an error regardding copy of the pointer: 'externalptr' which properly way to avoid this? thanks, cleber #################### > library( tcltk ) > tp <- tktoplevel() > > chk <- tclVar( TRUE ) > statusentry <- tclVar( "normal" ) # normal, disabled > anystring <- tclVar( "anystring" ) > > chebut <- ttkcheckbutton( tp, variable=chk, text='Save with new name: ', onvalue=TRUE, offvalue=FALSE, + command=function(...) ifelse( as.numeric(tclvalue(chk)), + tkconfigure(ent1,'-state','normal'), + tkconfigure(ent1,'-state','disabled') ) + ) > tcl( 'pack', chebut ) <Tcl> > > ent1 <- ttkentry( tp, textvariable=anystring, state='normal' ) > tcl( 'pack', ent1 ) <Tcl> Error in rep(no, length.out = length(ans)) : attempt to replicate an object of type 'externalptr' > --- Este email foi escaneado pelo Avast antiv?rus. https://www.avast.com/antivirus [[alternative HTML version deleted]]