Coll and Dict embed issues
I’m running into some problems saving data in my patch using coll and dict. I’ve tried setting embed to 1, importing and exporting from files, etc. but it’s always the same problem. The data is saved just fine, but when I try to modify it, (say by setting a value in dict) all the data is cleared and all that’s left is the new data I sent in. Has anyone experienced a similar problem, or would anyone know how to help?
An example patch would help, otherwise its only possible to guess why things aren’t turning out as you’d like.
My guess, from what you say, is that you are (unintentionally) overwriting the content(s) in dict rater than creating a new key value pair or appending data to the existing key…
I’ve attached a zip folder containing my example patch and the files needed to run it. I actually solved the coll issue in the process of writing the patch, but am still stumped on dict.
Also, when the contents of a dict object are deleted in the dictionary editor, and you send in another key to add, all of the previous contents reappear alongside the new key. You can only truly get rid of keys using the dict.strip object (and, apparently, reopening and modifying a dictionary). Related to the previous problem? Perhaps..
By the way, for those of you who are interested, there is a full explanation of the coll embed problem described above and its solution in the example patch. Basically, you can’t have values stored under the same key and have them recalled properly when the patch is reopened.
Hmm… There’s something going on in your patch that I haven’t been able to isolate yet (to make things worse I’m not all over the dict family yet so maybe I won’t be the best help). The thing is, with a really simple example of embedding dict data, then saving and reloading and adding new entries, dict works as expected…
-- Pasted Max Patch, click to expand. --Copy all of the following text. Then, in Max, select New From Clipboard.----------begin_max5_patcher---------- 847.3oc0X17aaBCE.+bxeEVbXmxhv1PBYm1trqUZ63T0jC7Zq6.alsIoYU8+ 8YaHMoe.EpV6HJBr3Ei868yuOr41oSBVKuAzAnOg9AZxjamNYhWjSvjlmmDT vtIMmo8cKXckwHEAyp+qRlI8Jt3xepfTS8vfowyimgHzEyCsM382Qm27NhpB tHGL9wC2Hjm4Gc45q+HdUvgdJqLOtq0hL6Jg5ILXMSbY.5b2+d2zotay5owj wSMy2vgscYOITmIPCSbMXbjqIIYHFT7yaPguBMNUVT.By9Az.23Uyfn4nyJA AhIxPrL6ER.aQWnp3FzFlhClcyPNyEoM77bj9J4VMpTAa3xJMJUJL1gUWKd+ nmyEPprR3mBZ6HhFRcK4zUgdDsXoqIZPHJb+bdgUSDrB+ZavWT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