Forums > MaxMSP

initialize textedit

March 3, 2010 | 12:52 am

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.


March 3, 2010 | 5:01 pm

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.

– Pasted Max Patch, click to expand. –

March 3, 2010 | 5:42 pm

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


March 3, 2010 | 7:31 pm

Great! I updated it and now works fine.

Thank you both for your help :)

w.


Viewing 4 posts - 1 through 4 (of 4 total)