Debian Codegraph @

demos/bgexec5.tcl

raw
1 #!../src/bltwish
2
3 package require BLT
4 # --------------------------------------------------------------------------
5 # Starting with Tcl 8.x, the BLT commands are stored in their own
6 # namespace called "blt". The idea is to prevent name clashes with
7 # Tcl commands and variables from other packages, such as a "table"
8 # command in two different packages.
9 #
10 # You can access the BLT commands in a couple of ways. You can prefix
11 # all the BLT commands with the namespace qualifier "blt::"
12 #
13 # blt::graph .g
14 # blt::table . .g -resize both
15 #
16 # or you can import all the command into the global namespace.
17 #
18 # namespace import blt::*
19 # graph .g
20 # table . .g -resize both
21 #
22 # --------------------------------------------------------------------------
23
24 if { $tcl_version >= 8.0 } {
25 namespace import blt::*
26 namespace import -force blt::tile::*
27 }
28
29 source scripts/demo.tcl
30
31 set shell bltwish
32 if { [info exists tcl_platform] && $tcl_platform(platform) == "windows" } {
33 set shell "$shell.exe"
34 }
35 if { [file executable "../src/$shell"] } {
36 set shell "../src/$shell"
37 }
38
39 set count 0
40 foreach demo [glob barchart?.tcl] {
41 bgexec var $shell $demo &
42 }
43
44 button .kill -text "Kill All" -command { set var 0 }
45 table . .kill -fill both
46
47