I keep running into problem with an abstraction I'm trying to implement. Let me first explain what I'm trying to do. I have an abstraction that has 16 tgls in a row. These are graphed on parent so they they can be altered from the main patch. When a user clicks on of the tgls it changes colour. This was all going fine until I created another instance of the same abstraction and found that clicking one of the tgls in one abstraction caused the other ones to change colour. This seems reasonable as they all share the same receive symbols. Then I set about having each tgls receive symbol change on instantiation. This too seemed to be working fine until I opened the whole patch again and found that the GUI objects most recent receive symbol is saved to them so every time I change one and close the patch I need to know what it was in order to change it dynamically on the next startup. I could simply hard code each abstraction but I may need up to thirty of them in one patch so this seems a little futile. There must a way of doing it? I've attached the a basic version of the abstraction. All you need to do is to instantiate it and pass a number box to it. It will work fine with many instances but as soon as I save and close Pd crashes the next time I save the parent patch. As I'm only getting back into Pd I'm sure I've implemented it badly. Perhaps someone could offer some advise on how to achieve what I want. Thanks for your patience with this.
regards, Rory.
#N canvas 354 114 926 648 10; #X obj -172 170 symbol \$1; #X msg -168 205 list \$1; #X obj -104 201 symbol; #X obj -162 268 pack s s f f f; #X msg -11 217 12; #X msg 27 216 22; #X obj -166 364 list trim; #X msg 121 218 set; #X obj -52 141 t b b b b b b; #X msg 59 217 addsemi; #X msg -97 175 color; #X obj -163 341 list prepend add2; #X msg 14 437 \; color 0 12 22; #X obj -51 85 loadbang; #X obj -97 62 inlet; #X floatatom -44 206 5 0 0 0 - - -; #X obj 19 72 loadbang; #X msg 24 104 44; #X obj -116 92 t b b f; #X obj 228 225 symbol \$1; #X msg 232 258 list \$1; #X obj 226 184 loadbang; #X obj 223 206 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1 -1; #X msg 236 355 \; obj_rec1 receive \$1; #X obj 147 121 bng 35 250 50 0 empty obj_rec1 empty 17 7 0 10 -262144 -1 -1; #X connect 0 0 1 0; #X connect 1 0 3 0; #X connect 2 0 3 1; #X connect 3 0 11 0; #X connect 4 0 3 3; #X connect 5 0 3 4; #X connect 6 0 12 0; #X connect 7 0 12 0; #X connect 8 0 0 0; #X connect 8 1 10 0; #X connect 8 2 15 0; #X connect 8 3 5 0; #X connect 8 3 4 0; #X connect 8 4 9 0; #X connect 8 5 7 0; #X connect 9 0 12 0; #X connect 10 0 2 0; #X connect 11 0 6 0; #X connect 13 0 8 0; #X connect 14 0 18 0; #X connect 15 0 3 2; #X connect 16 0 17 0; #X connect 17 0 15 0; #X connect 18 0 12 0; #X connect 18 1 8 0; #X connect 18 2 15 0; #X connect 19 0 20 0; #X connect 20 0 23 0; #X connect 21 0 22 0; #X connect 22 0 19 0; #X coords 0 -1 1 1 85 60 1 100 100;
_______________________________________________ [email protected] mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
