Created
May 17, 2020 03:23
-
-
Save hkoba/f3f16f98c90637ba4e409e38e965bc7e to your computer and use it in GitHub Desktop.
A demo for Tcl/Tk's `[send]` command. (Requires Tk8.6 on Unix with Xwindow support).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/wish | |
# -*- mode: tcl; coding: utf-8 -*- | |
tk appname AppX | |
set X 0 | |
pack [button .b -text "Increment var in AppY" -command { | |
send AppY [list incr Y] | |
}] -fill both -expand yes | |
pack [entry .e -textvariable X] -fill x -expand no |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/wish | |
# -*- mode: tcl; coding: utf-8 -*- | |
tk appname AppY | |
set Y 0 | |
pack [button .b -text "Increment var in AppX" -command { | |
send AppX [list incr X] | |
}] -fill both -expand yes | |
pack [entry .e -textvariable Y] -fill x -expand no |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment