suppress funbuff error messages?


    Apr 07 2008 | 4:33 am
    Is there a way to stop funbuff from printing error messages when you send it a dump or find message and it has nothing in it? I have a situation where it is normal for the funbuff to be empty, but my max window is filling up with:
    • error: funbuff_dump: nothing to dump
    I tried to use bag instead but it is orders of magnitude slower than funbuff for large data sets:

    • Apr 08 2008 | 5:43 am
      Stefan, Thanks for the helpful suggestions, as always. That's a nice trick.
      Still, that error message is pretty annoying and I wish it could be turned off with an attribute (or just get rid of it, I think we can figure out that funbuff is empty if nothing comes out).
      I overlooked a simple solution. I only ever need to store positive numbers, so I can loadbang a -1 into the funbuff and select it out when I dump. I did more timing tests and it turns out [bag] is slightly faster to dump than [funbuff] -> [select -1]. I'm not actually inserting too much data and need to dump constantly, so maybe I'll use bag after all.
      > Stefan Tiedje schrieb: > > > > You can also test funbuff by sending any number, if there is no output, it > is empty... > > > > Try this, it should only dump if its not empty... > > > #P window setfont "Sans Serif" 9.; > #P window linecount 1; > #P message 407 54 32 196617 dump; > #P message 347 54 32 196617 fill; > #P newex 407 146 50 196617 deferlow; > #P button 407 76 15 0; > #P message 304 54 32 196617 clear; > #P newex 361 130 30 196617 pack; > #P button 347 76 15 0; > #P newex 347 104 44 196617 uzi 10; > #P newex 407 243 67 196617 print funbuff; > #P message 407 104 50 196617 1; > #P newex 407 125 60 196617 grab; > #P message 407 168 33 196617 dump; > #N funbuff 0; > #P newobj 407 194 42 196617 funbuff; > #P connect 12 0 9 0; > #P connect 11 0 6 0; > #P connect 10 0 1 0; > #P connect 2 0 10 0; > #P connect 5 2 7 0; > #P connect 5 2 7 1; > #P connect 6 0 5 0; > #P connect 9 0 3 0; > #P fasten 8 0 0 0 309 189 412 189; > #P fasten 7 0 0 0 366 189 412 189; > #P connect 0 0 4 0; > #P fasten 2 1 0 0 462 189 412 189; > #P connect 1 0 0 0; > #P connect 3 0 2 0; > #P window clipboard copycount 13; > > > > > -- > Stefan Tiedje------------x------- > --_____-----------|-------------- > --(_|_ ----|-----|-----()------- > -- _|_)----|-----()-------------- > ----------()--------www.ccmix.com > >