initialize textedit

Michael Gounelas's icon

hi there,

it's been a long time since my last post here and I'm very happy to see the community growing! :)
anyway... Ive got a bit of a problem so any help is welcome :)

In one of my patches I'm using the [pattrstorage] object in order to save some slider settings as well as some [textedit] objects. Every time I load an .xml file all the setting are restored nicely.

If however, I decide to 'clear' the [textedit] and leave it blank, it will not save the setting on the new .xml.
Instead of the [textedit] being 'empty', it will load the 'old' textedit with all the text inside.

In other words I can't find a way to save an .xml when the textedit is completely blank.

I hope all these make some sense :)

thanks
w.

Hans Höglund's icon

A clear bug, the pattrstorage reacts to the clear message in the client window, but does not write it to disc.

I found a somewhat tricky workaround: Use a sprintf to generate the empty symbol, which can be used to clear textedit or any object that responds to set. This update is stored and restored properly by pattrstorage. See below.

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

Ben Bracken's icon

Make sure you both are using the latest version, 5.1.3, as there was a little fix for something like this.

Now, when storing an empty pattr slot, there will appear an in the data field in the client objects window. When recalled, it will provide you with the empty textedit you desire.

-Ben

Michael Gounelas's icon

Great! I updated it and now works fine.

Thank you both for your help :)

w.