Making two text fields persistent

Oct 21, 2009 at 3:59am

Making two text fields persistent

I have a patch with two user-editable text fields. I want them to be saved when the patch is closed, and loaded when the patch is opened.

I’ve come up with the following, but it seems rather complex. I can’t help thinking that there is a far simpler way to do it.

I can’t use pattrstorage, because I’m already using that to save other things in the patch, and trying to set up two pattrstorage objects in the same patch seems way to hard.

So here’s what I have – is there a better way?

– Pasted Max Patch, click to expand. –
#45986
Oct 21, 2009 at 4:07am

Hi there!

A way to do it without pattrstorage could be to use preset
like this:

– Pasted Max Patch, click to expand. –

Hope this helps!

#165686
Oct 21, 2009 at 4:12am

I’d considered preset, but the patch has to run under the runtime, so the data has to be saved in an external file.

#165687

You must be logged in to reply to this topic.