can not query from coll after pushing content from dict

BertBertBert's icon

Hello,
I have a m4l device in which data is stored in a coll. At certain points in time this data is written into a dict with the "pull_from_coll" message and after that the data in the coll is cleared. Then later the data from the dict is written back into the coll using the "push_to_coll" message.

So far so good. After I pushed the data back, the coll looks exactly like before (in the editor). But somehow I am not able to query this data! The coll object gives no output, when I put in an index. when I add other data to the coll I am able to query this data. But never the data that was comming from the dict.

Thanks for any hints & tipps.

Ben Bracken's icon

Hi Bert,

Could you post a simplified example of this? Are you using Max 7.0.4?

-Ben

BertBertBert's icon

Hi Ben,
sure. Find the patch attached.
I have the same behaviour in Max (not m4l). I'm using Max 6.1 but am installing 7.0.4. just now.

coll-to-dict-and-back.maxpat
Max Patch
Ben Bracken's icon

Hi Bert,

Ah, yes, this is something we fixed post-Max 7. Give it a spin with 7.0.4...

-Ben

BertBertBert's icon

Yes, I just got it with 7.0.4
Thanks!

Dan's icon

Hi,

I'm not sure if this is the right place - but it seems to be an extension of this same bug.

Although this seems to work now with some queries, the 'nth' message does not work, as far as I can see... Renumbering is also broken.

I've modified the above patch to demonstrate.

Am I doing something daft?

Any advice would be greatfully received!

Dan

M4L 7.3.3

coll-to-dict-and-back2.maxpat
Max Patch

broc's icon

I think the problem is that 'pull_from_coll' converts the coll index numbers to keys (symbols) but 'push_to_coll' doesn't convert the symbols back to numbers (as it doesn't know if they were originally symbols or numbers). So if numbers are expected in the target coll, index symbols must be converted to numbers.

Max Patch
Copy patch and select New From Clipboard in Max.

Dan's icon

Many thanks - I will check it out when I get back!

Dan's icon

Thanks, Manfred. That worked a treat.

I had approached from the other end and had a workaround that queried symbols... but it was very clunky. This is far more satisfactory.