An embedded and charset-unspecified text was scrubbed... Name: not available Url: https://stat.ethz.ch/pipermail/r-sig-gui/attachments/20050827/7bc72cd6/attachment.pl
[R-gui] "..." in R tcltk example List Box With A Scroll Bar
3 messages · morphwj@comcast.net, Philippe GROSJEAN, Peter Dalgaard
Indeed, this is puzzling. It must be related to the way the tcltk package call Tcl code. You are better to ask Peter Dalgaard directly if you receive no convincing answer here. Best, Philippe Grosjean ..............................................<?}))><........ ) ) ) ) ) ( ( ( ( ( Prof. Philippe Grosjean ) ) ) ) ) ( ( ( ( ( Numerical Ecology of Aquatic Systems ) ) ) ) ) Mons-Hainaut University, Pentagone (3D08) ( ( ( ( ( Academie Universitaire Wallonie-Bruxelles ) ) ) ) ) 8, av du Champ de Mars, 7000 Mons, Belgium ( ( ( ( ( ) ) ) ) ) phone: + 32.65.37.34.97, fax: + 32.65.37.30.54 ( ( ( ( ( email: Philippe.Grosjean at umh.ac.be ) ) ) ) ) ( ( ( ( ( web: http://www.umh.ac.be/~econum ) ) ) ) ) http://www.sciviews.org ( ( ( ( ( ..............................................................
morphwj at comcast.net wrote:
In the R tcltk example "List Box With A Scroll Bar" in List Boxes at http://bioinf.wehi.edu.au/~wettenhall/RTclTkExamples/ removal of "..." in scr <- tkscrollbar(tt, repeatinterval=5, command = function(...) tkyview(tl,...)) tl <- tklistbox(tt, height=4, selectmode="single", yscrollcommand=function(...) tkset(scr,...), background="white") results in message "Error in function () : unused argument(s) ( ...)". Why does the example work with "..." and not work when "..." are omitted, or what process is occuring that requires "..."? Thanks [[alternative HTML version deleted]]
_______________________________________________ R-SIG-GUI mailing list R-SIG-GUI at stat.math.ethz.ch https://stat.ethz.ch/mailman/listinfo/r-sig-gui
morphwj at comcast.net writes:
In the R tcltk example "List Box With A Scroll Bar" in List Boxes at http://bioinf.wehi.edu.au/~wettenhall/RTclTkExamples/ removal of "..." in scr <- tkscrollbar(tt, repeatinterval=5, command = function(...) tkyview(tl,...)) tl <- tklistbox(tt, height=4, selectmode="single", yscrollcommand=function(...) tkset(scr,...), background="white") results in message "Error in function () : unused argument(s) ( ...)". Why does the example work with "..." and not work when "..." are omitted, or what process is occuring that requires "..."?
(There are 4 cases of "...", which one did you try to remove??) The reason is that the callback commands get invoked with arguments which need to be passed from the scrollbar to the listbox and vice versa. The structure of these arguments depends somewhat on the particular event (exactly where you clicked the scrollbar), so you can't have an ordinary argument list. In any case, named arguments to callback are translated to %X style calls on the Tk side, so wouldn't work.
O__ ---- Peter Dalgaard ?ster Farimagsgade 5, Entr.B c/ /'_ --- Dept. of Biostatistics PO Box 2099, 1014 Cph. K (*) \(*) -- University of Copenhagen Denmark Ph: (+45) 35327918 ~~~~~~~~~~ - (p.dalgaard at biostat.ku.dk) FAX: (+45) 35327907