Re: [R] [tcltk] binding two functions to one event

2025-01-22 Thread re...@meer.net
Thank you very much for your solution. It works for regular X events also. It never occurred to me that the argument to bind could be anything but a procedure name. Quoting peter dalgaard : This is in the obscure corners of the tcltk interface, as I am sure you already realized... I'm not

Re: [R] [tcltk] binding two functions to one event

2025-01-21 Thread peter dalgaard
This is in the obscure corners of the tcltk interface, as I am sure you already realized... I'm not even sure whether the "+" in bind +script is syntactically an operator or part of the command. However, it is usually not right to define named functions on the Tcl side and mix them with t

[R] [tcltk] binding two functions to one event

2025-01-20 Thread re...@meer.net
Here is some tcl/tk code I am trying to emulate in R. Paste the following into wish ### begin tcl code toplevel .wtop proc evresp1 { data } { puts "evresp1 $data" } proc evresp2 { data } { puts "evresp2 $data" } bind all <> "evresp1 %d" bind all <> "+evresp2 %d" ### end tcl code Now paste ev