Dumping coll including index into a list?


    May 29 2022 | 3:36 pm
    Assuming I have a coll object with few indexes and certain values - how can I dump them into a list. Not only the data but also the index number associate with its data. so if my coll object have the following: 0, 55; 1, 553; 2, 33; 3 hi;
    when pressing on the 'dump' message it will output the above into a list. Thanks

    • May 29 2022 | 4:31 pm
      Max Patcher
      In Max, select New From Clipboard.
    • May 30 2022 | 1:56 am
      or if total lenght is known, [zl group].
    • May 30 2022 | 12:49 pm
      what a nonesense ... coll outputs index first , then data. Not as stated on that screenshot ... another very helpfull information ? All one needs to fill the list is to insert append.
      because - index first, followed by data. Patch from Jean-Francois needs just a little correction because also index can be a symbol
    • May 30 2022 | 1:47 pm
      Well spotted, the index can be a symbol, indeed!
    • May 30 2022 | 4:10 pm
      Here's another method using zl.group:
      Max Patcher
      In Max, select New From Clipboard.
    • May 31 2022 | 5:56 am
      @andy Only stupid thing is that you forgot to fix the patch you posted which still shows unneeded reversal of the list and wrong statement about output order. Someone could download it and take it for true...
    • Jun 02 2022 | 10:21 am
      Is there a nice way of showing the dump data from coll not inside a message object?
      so every index will be in a new line (patch is attached) rather then option 1 in which all content is following in the same line, it will be like in option 2 in which each index and is associate data will be in a new line.
      Max Patcher
      In Max, select New From Clipboard.
    • Jun 02 2022 | 11:00 am
      Maybe like this :
      Max Patcher
      In Max, select New From Clipboard.
    • Jun 02 2022 | 11:26 am
      I've used this method before, using chooser, to create debugging lists:
      Max Patcher
      In Max, select New From Clipboard.
    • Jun 02 2022 | 11:33 am
      Or use this version if your coll items have more than one value per entry:
      Max Patcher
      In Max, select New From Clipboard.