From bc5e203f7787980f65f81ddbf69a619ab34fa85e Mon Sep 17 00:00:00 2001 From: "N.N." Date: Tue, 9 Mar 2004 12:41:22 +0000 Subject: toxy alpha6 svn path=/trunk/externals/miXed/; revision=1396 --- test/toxy/listbox-test.pd | 38 ++++++++++++++++++++++---------------- 1 file changed, 22 insertions(+), 16 deletions(-) (limited to 'test/toxy/listbox-test.pd') diff --git a/test/toxy/listbox-test.pd b/test/toxy/listbox-test.pd index cd1fa46..751fb58 100644 --- a/test/toxy/listbox-test.pd +++ b/test/toxy/listbox-test.pd @@ -1,18 +1,24 @@ -#N canvas 154 52 626 383 12; -#X obj 281 144 widget listbox lb -width 32 -height 12 -bg black -fg -white; -#X obj 20 282 tow . listbox lb; -#X obj 20 21 loadbang; -#X msg 20 52 ini foreach fn [lsort [glob *]] .(.- insert end $fn.) -; -#X obj 236 143 widget button b -text ok -height 14 -bg black -fg white +#N canvas 445 76 626 425 12; +#X obj 281 179 widget listbox lb -width 32 -height 12 -bg black -fg +white @bang ::toxy::lbcommand .- .|; +#X obj 20 295 tow . listbox lb; +#X obj 20 23 loadbang; +#X obj 236 179 widget button b -text ok -height 1 -bg black -fg white -command .<.>; -#X obj 112 21 tow . button b; -#X msg 36 83 tot if .([.- curselection] != "".) .(eval ..); -#X msg 20 324; -#X connect 1 0 7 0; -#X connect 2 0 3 0; -#X connect 3 0 1 0; -#X connect 5 0 6 0; +#X obj 84 179 tow . button b; +#X msg 20 337; +#X msg 54 257 tot puts [.- size]; +#X msg 44 222 tot .- delete 0 end; +#X msg 33 179 bang; +#X msg 20 57 tot proc ::toxy::lbcommand .(path target.) .(if .([$path +curselection] != "".) .(pd [concat $target _cb set [$path get [$path +curselection]] .`.:].).) \, ini if .([.- size] == 0.) .(foreach fn +[lsort [glob *]] .(.- insert end $fn.) .: bind .- +.(::toxy::lbcommand .- .|.).) \, @bang ::toxy::lbcommand .- .|; +#X connect 1 0 5 0; +#X connect 2 0 9 0; +#X connect 4 0 1 0; #X connect 6 0 1 0; +#X connect 7 0 1 0; +#X connect 8 0 1 0; +#X connect 9 0 1 0; -- cgit v1.2.1