bug in counter or I'm just blind…

Apr 2, 2008 at 12:19pm

bug in counter or I'm just blind…

Hello,
I was two hours dealing with the following patch -also in trace mode- and I didn’t catch my error. Am I forgetting something or could it be that there is a bug in the counter object or some of the other objects I use in the patch. The patch is a part of a bigger one that should perform an automatic counting action for dumping matrixes.
Thank you for your help,

Alberto

#P window setfont “Sans Serif” 9.;
#P window linecount 1;
#P comment 823 204 52 196617 then bang;
#P newex 805 226 32 196617 t 0 1;
#P button 805 203 15 0;
#P number 866 407 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P message 844 405 14 196617 0;
#P newex 844 383 32 196617 sel 5;
#P newex 827 348 27 196617 t b i;
#P newex 827 277 35 196617 gate;
#P number 915 173 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#N counter;
#X flags 0 0;
#P newobj 827 321 99 196617 counter;
#P comment 910 156 121 196617 set maximum value first;
#P connect 8 0 9 0;
#P connect 9 1 3 0;
#P fasten 6 0 3 0 849 425 803 425 803 264 832 264;
#P connect 3 0 1 0;
#P connect 1 0 4 0;
#P connect 4 1 5 0;
#P connect 5 0 6 0;
#P fasten 4 0 3 1 832 373 795 373 795 249 857 249;
#P fasten 2 0 5 1 920 360 871 360;
#P connect 5 1 7 0;
#P fasten 9 0 1 3 810 305 898 305;
#P connect 2 0 1 4;
#P window clipboard copycount 11;

#36687
Apr 2, 2008 at 12:52pm

I don’t really understand why your patch gives a stack overflow but it looks like it’s working if you trigger 0 “on next clock” instead of “immediately” and then send a bang to start counter…
BTW did you think about using [uzi] instead of [counter] ?
Hope that helps.

#P window setfont “Sans Serif” 9.;
#P window linecount 1;
#P comment 287 173 52 196617 then bang;
#P newex 353 267 27 196617 – 1;
#P newex 323 243 40 196617 uzi;
#P button 323 187 15 0;
#P newex 323 219 27 196617 i;
#P number 348 185 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P comment 332 154 121 196617 set maximum value;
#P newex 353 290 49 196617 print UZI;
#P newex 205 346 76 196617 print COUNTED;
#P comment 162 141 52 196617 then bang;
#P newex 144 163 40 196617 t b 0 1;
#P button 144 140 15 0;
#P message 183 342 14 196617 0;
#P newex 183 320 32 196617 sel 5;
#P newex 166 285 27 196617 t b i;
#P newex 166 214 35 196617 gate;
#P number 254 110 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#N counter;
#X flags 0 0;
#P newobj 166 258 66 196617 counter;
#P comment 249 93 121 196617 set maximum value first;
#P connect 16 2 17 0;
#P connect 17 0 11 0;
#P connect 14 0 16 0;
#P connect 15 0 14 0;
#P connect 13 0 14 1;
#P connect 5 1 10 0;
#P connect 1 0 4 0;
#P connect 3 0 1 0;
#P connect 8 0 1 0;
#P lcolor 6;
#P connect 8 1 1 2;
#P lcolor 6;
#P connect 8 2 3 0;
#P connect 7 0 8 0;
#P fasten 2 0 5 1 259 297 210 297;
#P fasten 4 0 3 1 171 310 134 310 134 186 196 186;
#P connect 5 0 6 0;
#P connect 4 1 5 0;
#P fasten 6 0 3 0 188 362 142 362 142 201 171 201;
#P window clipboard copycount 19;

#126052
Apr 2, 2008 at 1:54pm

Thank you very much for the work-around, now it works. I cannot use uzi, because I need to send the numbers “manually”, in order to trigger other actions for every one of them.
Cheers,

Alberto

#126053

You must be logged in to reply to this topic.