Re-hello,
I've just figured out that there is an error in one of the patches I've posted,
Here is the memory patch and it's application again,
It's made with native functions and you won't need any external file with it (text file or anything)
Open menu-test.pd for having a sight.
Patco
Yahoo! Mail réinvente le mail ! Découvrez le nouveau Yahoo! Mail et son interface révolutionnaire.
#N canvas 274 215 442 487 10; #X obj 9 12 inlet; #X msg 214 211 addcomma; #X msg 116 170 set; #X obj 116 148 spigot 1; #X msg 123 125 0; #X obj 71 102 t b a b b b; #X msg 159 126 1; #X obj 159 103 r $1-init; #X obj 226 385 ==; #X obj 132 429 spigot; #X obj 132 450 outlet; #X obj 292 216 inlet; #X obj 129 324 list split 1; #X obj 314 47 route clear; #X obj 321 135 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 -1; #X obj 86 212 list prepend add2; #X obj 129 404 list append; #X obj 86 238 list trim; #X obj 284 252 t b b a; #X obj 129 346 t b a; #X obj 86 271 s $1-msg-in; #X obj 129 300 r $1-msg-out; #N canvas 0 0 454 304 length 0; #X obj 126 70 inlet; #X obj 161 209 + 1; #X obj 81 162 b; #X obj 116 249 f; #X obj 116 276 outlet; #X obj 148 183 1; #X obj 132 211 f 1; #X obj 206 213 0; #X obj 126 104 t a b b; #N canvas 0 0 541 415 drip 0; #X obj 64 206 list split 1; #X obj 64 123 until; #X obj 64 181 list append; #X obj 194 206 bang; #X text 146 90 First store list , then start the loop; #X text 163 118 "until" bangs its output until told to stop by a "bang" to its right inlet.; #X text 182 160 Store the remaining list.; #X text 239 205 third outlet of "split" tells us to stop.; #X obj 64 243 outlet; #X obj 64 57 inlet; #X text 237 44 From list-help.pd; #X obj 143 243 outlet; #X obj 64 86 t b a; #X connect 0 0 8 0; #X connect 0 1 2 1; #X connect 0 2 3 0; #X connect 0 2 11 0; #X connect 1 0 2 0; #X connect 2 0 0 0; #X connect 3 0 1 1; #X connect 9 0 12 0; #X connect 12 0 1 0; #X connect 12 1 2 1; #X restore 81 133 pd drip; #X connect 0 0 8 0; #X connect 1 0 6 1; #X connect 2 0 6 0; #X connect 3 0 4 0; #X connect 5 0 6 1; #X connect 6 0 1 0; #X connect 6 0 3 1; #X connect 7 0 3 1; #X connect 8 0 9 0; #X connect 8 1 5 0; #X connect 8 2 7 0; #X connect 9 0 2 0; #X connect 9 1 3 0; #X restore 341 355 pd length; #X obj 328 385 i; #X obj 328 308 loadbang; #X obj 328 411 outlet; #X obj 341 334 r $1-msg-out; #X connect 0 0 5 0; #X connect 0 0 13 0; #X connect 1 0 20 0; #X connect 2 0 20 0; #X connect 3 0 2 0; #X connect 4 0 3 1; #X connect 5 1 15 0; #X connect 5 2 4 0; #X connect 5 3 3 0; #X connect 5 4 1 0; #X connect 6 0 3 1; #X connect 7 0 6 0; #X connect 8 0 9 1; #X connect 9 0 10 0; #X connect 11 0 18 0; #X connect 12 0 19 0; #X connect 12 1 16 1; #X connect 13 0 14 0; #X connect 14 0 2 0; #X connect 15 0 17 0; #X connect 16 0 9 0; #X connect 17 0 20 0; #X connect 18 0 20 0; #X connect 18 2 8 1; #X connect 19 0 16 0; #X connect 19 1 8 0; #X connect 21 0 12 0; #X connect 22 0 23 1; #X connect 23 0 25 0; #X connect 24 0 23 0; #X connect 26 0 22 0;
#N canvas 167 197 586 436 10; #X obj 0 0 cnv 15 80 20 empty $1-menu-cnv cat 30 12 1 8 -233017 -1 0; #X obj 18 0 hsl 60 20 0 127 0 0 $1-menu-sl $1-menu-sl-r dog 2 10 0 8 -166441 -166441 -1 0 1; #X floatatom 1 3 2 1 99 0 - - -; #X obj 302 62 inlet; #X obj 20 300 outlet; #X obj 231 60 r $1-menu; #X msg 200 259 label $1; #X obj 302 88 list trim; #X msg 324 165 clear; #X obj 200 229 symbol; #X obj 200 208 litememory $1; #X msg 362 226 label; #X obj 200 324 s $1-menu-sl-r; #X obj 70 208 i; #X obj 70 154 r $1-menu-sl; #X obj 70 181 t b; #X obj 302 121 route add index clear label; #X obj 412 174 symbol; #X msg 411 229 label $1; #X obj 273 259 list prepend range; #X msg 273 230 0 $1; #X connect 2 0 10 1; #X connect 2 0 13 1; #X connect 3 0 7 0; #X connect 5 0 7 0; #X connect 6 0 12 0; #X connect 7 0 16 0; #X connect 8 0 10 0; #X connect 9 0 6 0; #X connect 10 0 9 0; #X connect 10 1 20 0; #X connect 11 0 12 0; #X connect 13 0 4 0; #X connect 14 0 15 0; #X connect 15 0 13 0; #X connect 16 0 10 0; #X connect 16 1 2 0; #X connect 16 2 8 0; #X connect 16 2 11 0; #X connect 16 3 17 0; #X connect 17 0 18 0; #X connect 18 0 12 0; #X connect 19 0 12 0; #X connect 20 0 19 0; #X coords 0 -1 1 1 80 20 1 0 0;
#N canvas 469 45 478 600 10; #X msg 137 31 add 1 dog , add 2 cat , add 3 test; #X floatatom 73 71 2 0 0 0 - - -; #X msg 74 113 index $1; #X msg 176 75 clear; #X obj 158 229 menu test; #X text 171 57 clear the menu content; #N canvas 0 0 506 356 array 0; #X obj 105 32 r test-msg-in; #X obj 102 121 s test-msg-out; #X msg 107 74 1 dog , 2 cat , 3 test; #X text 235 32 this is the memory; #X connect 0 0 2 0; #X connect 2 0 1 0; #X restore 259 197 pd array; #X obj 212 145 s pd-menu-test.pd; #X text 259 181 menu content is here; #X obj 36 200 s test-menu; #X floatatom 30 134 2 0 0 0 - - -; #X msg 31 163 index $1; #X msg 212 121 menusave; #X text 47 454 just don't forget to associate an array subpatch with the send-receive objects in the same patch , like in this example. ; #X text 167 211 menu <test>; #X text 45 392 creation arguments: menu <name of the menu>; #X text 46 421 with this method you can put several different menus in the same patch; #X floatatom 160 262 5 0 0 0 - - -; #X text 208 100 save the menus content; #X text 150 14 fill the menu; #X text 46 309 When the menu is filled , choose a number and click on the slider; #X connect 0 0 4 0; #X connect 1 0 2 0; #X connect 2 0 4 0; #X connect 3 0 4 0; #X connect 4 0 17 0; #X connect 10 0 11 0; #X connect 11 0 9 0; #X connect 12 0 7 0;