aboutsummaryrefslogtreecommitdiff
path: root/test/toxy
diff options
context:
space:
mode:
Diffstat (limited to 'test/toxy')
-rw-r--r--test/toxy/default.wid26
-rw-r--r--test/toxy/stress/bulk.pd78
-rw-r--r--test/toxy/stress/catchme.pd117
-rw-r--r--test/toxy/tclversion.pd13
4 files changed, 229 insertions, 5 deletions
diff --git a/test/toxy/default.wid b/test/toxy/default.wid
index f3f549f..5553c92 100644
--- a/test/toxy/default.wid
+++ b/test/toxy/default.wid
@@ -29,10 +29,18 @@ proc ::toxy::itemsettrace {op path target varname} {
error $err
}
} else {
- trace add variable $res write "::toxy::itembindtrace $varname"
+ if {[info tclversion] < 8.4} {
+ trace variable $res w "::toxy::itembindtrace $varname"
+ } else {
+ trace add variable $res write "::toxy::itembindtrace $varname"
+ }
}
if {![info exists $varname.last]} { set $varname.last "" }
- trace add variable $varname write "::toxy::itemdotrace $target"
+ if {[info tclversion] < 8.4} {
+ trace variable $varname w "::toxy::itemdotrace $target"
+ } else {
+ trace add variable $varname write "::toxy::itemdotrace $target"
+ }
return
} else { return 0 }
}
@@ -45,8 +53,12 @@ proc ::toxy::itemremovetrace {op path varname} {
error $err
}
} elseif {$res != ""} {
- catch { trace remove variable \
- $res write "::toxy::itembindtrace $varname" }
+ if {[info tclversion] < 8.4} {
+ catch { trace vdelete $res w "::toxy::itembindtrace $varname" }
+ } else {
+ catch { trace remove variable \
+ $res write "::toxy::itembindtrace $varname" }
+ }
}
}
}
@@ -54,7 +66,11 @@ proc ::toxy::itemremovetrace {op path varname} {
proc ::toxy::itemdestroy {path varname} {
::toxy::itemremovetrace -variable $path $varname.var
::toxy::itemremovetrace -textvariable $path $varname.txt
- unset -nocomplain $varname.last $varname.var $varname.txt $varname
+ if {[info tclversion] < 8.4} {
+ catch { unset $varname.last $varname.var $varname.txt $varname }
+ } else {
+ unset -nocomplain $varname.last $varname.var $varname.txt $varname
+ }
catch {destroy $path}
}
diff --git a/test/toxy/stress/bulk.pd b/test/toxy/stress/bulk.pd
new file mode 100644
index 0000000..e4efc49
--- /dev/null
+++ b/test/toxy/stress/bulk.pd
@@ -0,0 +1,78 @@
+#N canvas 75 60 628 612 12;
+#X obj 62 449 pack;
+#X obj 62 387 t b b;
+#X obj 62 356 until;
+#X obj 33 250 makefilename #%x;
+#X obj 33 219 + 256;
+#X obj 33 188 random 3840;
+#X obj 62 418 random 500;
+#X obj 175 418 random 500;
+#X obj 33 126 + 3;
+#X obj 83 6 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0 1;
+#X obj 157 95 random 10;
+#X obj 157 126 sel 7;
+#X obj 175 449 + 20;
+#X obj 33 6 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 -1
+;
+#X msg 130 33 tot .^.c delete bulk;
+#X msg 62 480 add [expr \$1 + .#1] [expr \$2 + .#2];
+#X msg 62 511 debug;
+#X obj 33 285 pack s 0 0;
+#X msg 33 320 add -tags bulk -fill \$1 -smooth true \, push \$2 \$3
+;
+#X msg 157 188 reset \, add .^.c create polygon;
+#X obj 261 250 random 150;
+#X obj 201 219 random 100;
+#X obj 201 250 + 10;
+#X obj 33 95 random 700;
+#X obj 33 544 tot .;
+#X obj 328 414 makefilename #%x;
+#X obj 328 383 + 256;
+#X obj 328 352 random 3840;
+#X msg 328 449 tot .^.c configure -bg \$1;
+#X obj 33 157 t b b b 0 b;
+#X obj 33 64 t b b b;
+#X obj 277 95 random 5;
+#X obj 277 126 sel 3;
+#X obj 33 33 metro 300;
+#X connect 0 0 15 0;
+#X connect 1 0 6 0;
+#X connect 1 1 7 0;
+#X connect 2 0 1 0;
+#X connect 3 0 17 0;
+#X connect 4 0 3 0;
+#X connect 5 0 4 0;
+#X connect 6 0 0 0;
+#X connect 7 0 12 0;
+#X connect 8 0 29 0;
+#X connect 9 0 33 0;
+#X connect 10 0 11 0;
+#X connect 11 0 14 0;
+#X connect 12 0 0 1;
+#X connect 13 0 30 0;
+#X connect 14 0 24 0;
+#X connect 15 0 24 0;
+#X connect 16 0 24 0;
+#X connect 17 0 18 0;
+#X connect 18 0 24 0;
+#X connect 19 0 24 0;
+#X connect 20 0 17 2;
+#X connect 21 0 22 0;
+#X connect 22 0 17 1;
+#X connect 23 0 8 0;
+#X connect 24 3 27 0;
+#X connect 25 0 28 0;
+#X connect 26 0 25 0;
+#X connect 27 0 26 0;
+#X connect 28 0 24 0;
+#X connect 29 0 5 0;
+#X connect 29 1 21 0;
+#X connect 29 2 20 0;
+#X connect 29 3 2 0;
+#X connect 29 4 19 0;
+#X connect 30 0 23 0;
+#X connect 30 1 10 0;
+#X connect 30 2 31 0;
+#X connect 31 0 32 0;
+#X connect 32 0 27 0;
+#X connect 33 0 30 0;
diff --git a/test/toxy/stress/catchme.pd b/test/toxy/stress/catchme.pd
new file mode 100644
index 0000000..318cf70
--- /dev/null
+++ b/test/toxy/stress/catchme.pd
@@ -0,0 +1,117 @@
+#N canvas 68 66 301 201 12;
+#N canvas 106 79 583 484 catchme 0;
+#X obj 150 96 t b b;
+#X obj 150 207 + 100;
+#X obj 251 207 + 100;
+#X obj 150 133 random 10;
+#X obj 251 133 random 10;
+#X obj 22 22 inlet;
+#X msg 22 290 tot wm geometry .^ \$1;
+#X obj 150 60 metro 30;
+#X obj 349 60 metro 3000;
+#X obj 349 96 random 300;
+#X obj 452 96 random 300;
+#X obj 190 170 line;
+#X obj 291 170 line;
+#X obj 22 60 metro 1000;
+#X obj 22 253 sprintf symbol %dx%d+%d+%d;
+#X obj 22 170 line;
+#X obj 89 207 + 200;
+#X msg 22 133 \$1 900;
+#X msg 452 133 \$1 2900;
+#X msg 349 133 \$1 2900;
+#X obj 22 96 random 75;
+#X obj 22 207 + 300;
+#X obj 490 60 metro 300;
+#X obj 22 325 tot catchme.pd;
+#X obj 143 363 delay 500;
+#X obj 143 443 s catchme-start;
+#X obj 260 325 key;
+#X obj 260 363 sel 32;
+#X msg 191 401 0;
+#X msg 143 401 1;
+#N canvas 90 49 662 516 selfornamentation 0;
+#X obj 38 85 random 256;
+#X obj 135 85 random 256;
+#X obj 233 85 random 256;
+#X obj 113 407 symbol;
+#X obj 113 290 random 3;
+#X obj 113 322 sel 0 1 2;
+#X obj 38 120 sprintf symbol #%02x%02x%02x;
+#X msg 193 363 scraTchme;
+#X msg 113 363 caTchme;
+#X msg 297 363 deTachme;
+#X obj 38 14 inlet;
+#X msg 38 159 tot .~root.c itemconfig .~tagR -fill \$1;
+#X msg 66 206 tot .~root.c itemconfig .~tagR -width 11;
+#X msg 86 244 tot .~root.c itemconfig .~tag -font .(helvetica 48 bold
+italic.);
+#X obj 38 48 t b b b b;
+#X obj 169 14 inlet;
+#X obj 38 476 tot catchme;
+#X msg 113 443 tot .~owner.c itemconfig .~tag -text \$1;
+#X connect 0 0 6 0;
+#X connect 1 0 6 1;
+#X connect 2 0 6 2;
+#X connect 3 0 17 0;
+#X connect 4 0 5 0;
+#X connect 5 0 8 0;
+#X connect 5 1 7 0;
+#X connect 5 2 9 0;
+#X connect 6 0 11 0;
+#X connect 7 0 3 0;
+#X connect 8 0 3 0;
+#X connect 9 0 3 0;
+#X connect 10 0 14 0;
+#X connect 11 0 16 0;
+#X connect 12 0 16 0;
+#X connect 13 0 16 0;
+#X connect 14 0 0 0;
+#X connect 14 1 1 0;
+#X connect 14 2 2 0;
+#X connect 14 3 4 0;
+#X connect 15 0 12 0;
+#X connect 15 0 13 0;
+#X connect 17 0 16 0;
+#X restore 319 253 pd selfornamentation;
+#X connect 0 0 3 0;
+#X connect 0 1 4 0;
+#X connect 1 0 14 2;
+#X connect 2 0 14 3;
+#X connect 3 0 1 0;
+#X connect 4 0 2 0;
+#X connect 5 0 7 0;
+#X connect 5 0 8 0;
+#X connect 5 0 13 0;
+#X connect 5 0 22 0;
+#X connect 6 0 23 0;
+#X connect 7 0 0 0;
+#X connect 8 0 9 0;
+#X connect 8 0 10 0;
+#X connect 9 0 19 0;
+#X connect 10 0 18 0;
+#X connect 11 0 1 1;
+#X connect 12 0 2 1;
+#X connect 13 0 20 0;
+#X connect 14 0 6 0;
+#X connect 15 0 16 0;
+#X connect 15 0 21 0;
+#X connect 16 0 14 1;
+#X connect 17 0 15 0;
+#X connect 18 0 12 0;
+#X connect 19 0 11 0;
+#X connect 20 0 17 0;
+#X connect 21 0 14 0;
+#X connect 22 0 30 0;
+#X connect 23 3 24 0;
+#X connect 23 3 30 1;
+#X connect 24 0 29 0;
+#X connect 26 0 27 0;
+#X connect 27 0 28 0;
+#X connect 28 0 25 0;
+#X connect 29 0 25 0;
+#X coords 0 0 0.00362319 0.00319489 200 140 0;
+#X restore 15 80 pd catchme;
+#X obj 15 29 tgl 10 0 empty catchme-start empty 0 -6 0 8 -262144 -1
+-1 0 1;
+#X connect 1 0 0 0;
diff --git a/test/toxy/tclversion.pd b/test/toxy/tclversion.pd
new file mode 100644
index 0000000..9b348b0
--- /dev/null
+++ b/test/toxy/tclversion.pd
@@ -0,0 +1,13 @@
+#N canvas 68 131 532 301 24;
+#X obj 38 191 tot .;
+#X obj 38 29 loadbang;
+#X msg 38 138 query concat set [info tclversion];
+#X msg 38 243;
+#X obj 38 86 t b b;
+#X msg 147 191 set;
+#X connect 0 0 3 0;
+#X connect 1 0 4 0;
+#X connect 2 0 0 0;
+#X connect 4 0 2 0;
+#X connect 4 1 5 0;
+#X connect 5 0 3 0;