Coll auto save in patch fails

artelse's icon

I try to save coll data in the patch by setting the embed flag in the inspector. When I close the patch, coll data is not saved and max doesn't ask to save the patch before closing. I tried sending a [flag 1 0] message with a closebang, but this doesn't work either. How is the flag different from the embed? When I send the [flag 1 0] message, the embed flag gets set..

Any insights?

KrisW's icon

im not sure , if u send [embed 1] message it will embed [coll]s data it into your patcher . but u need to save your patcher if u want to include it inside

artelse's icon

Yes, it has saved a data set once and it never wants to update the changed data. Still puzzled by [flag 1 0] vs [embed 1].

Chris Muir's icon

Any chance that you have a saved file on disk that the coll is reading? Try adding a 1 after the name of the coll so that it will not try to read from disk.

artelse's icon

That's already what I do: [coll name 1] Documentation isn't very extensive on these options have to say.

KrisW's icon

it might be not your problem but ,i had some issues when ive tried to store links that has been bad formated ... ive used "" instead of "/" ... in my case [coll] did not readed ,stored or keept anything . just to let you know that it also could be the case if you are using [coll] for such data .

artelse's icon

Tried quite a few things, even stuff like name space conflicts and the like, but can't get changed coll data to save in the patch. I now reverted to saving to and loading from file with a closebang and loadbang construct. At least it works now, but might be a bug.

KrisW's icon
Max Patch
Copy patch and select New From Clipboard in Max.

can you see the data in my coll ? could do the same and post ?

you should try to prove it on a fresh patch
PS: it might also be that you did not NAMED your coll . im guessing

artelse's icon
Max Patch
Copy patch and select New From Clipboard in Max.

Here's my coll with data. Not sure this is useful as creating a new coll in a new patch, copies from memory the data and it's not a problem with data in memory, but saving it in the patch.

KrisW's icon

strange ,ive saved your code as patch and reopened it - data is here . can you confirm it with my attachment ?

4537.savedcoll.maxpat
Max Patch
artelse's icon

That works fine. Perhaps it has something to do with bpatchers?

Chris Muir's icon

So what do bpatchers have to do with it? If you're saying that the coll is in a bpatcher, and it doesn't get saved when the top level patch gets saved, that is the way things work. You are not saving the bpatcher when you save the top level patcher, so the contents of the coll doesn't get saved.

What I do in this case, is have a "Vault" subpatcher at the top level (not an abstraction) that holds all my colls, tables, etc. I use arguments to abstractions/bpatchers to get them to use the colls in the "Vault."