Can pattr be used to store string?
I am writing a patch where I need to store a series of filenames and other parameters from run to run.
autopattr and pattrstorage seem to work fine for numbers - however, the messageboxes where I am keeping filenames just show "object(message)" as the content, in the pattstorage clientwindow and storagewindow, also in the XML file when I save.
Is there a way to use pattr to save strings? Or should I be looking at something else?
Wait, I need to use a textedit field, not a message. That seems to work fine.
Now next question - I am specifying a filename in the write message that goes to pattrstorage, eg "write bsl"
This gives me an error from pattrstorage, "could not create file (-1)"
What could be the problem? I absolutely need for the patch to read and write from its file without ever prompting for a name.
Have you looked at the savemode attribute of pattrstorage? Set it to savemode 3 for no prompting. Try to save the file manually first by just sending a "write" message, or make sure the file you try to save, "bsl", already exists.
Thanks, that's helpful! @savemode 3 is not documented however, I can only see savemode 0 - 2 listed in the reference.
You're right, it's missing in the reference! It's in the help file, in the patcher savemode.
J-F.