initialize textedit

Mar 3, 2010 at 12:52am

initialize textedit

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.

#48877
Mar 3, 2010 at 5:01pm

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. –
#175641
Mar 3, 2010 at 5:42pm

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

#175642
Mar 3, 2010 at 7:31pm

Great! I updated it and now works fine.

Thank you both for your help :)

w.

#175643

You must be logged in to reply to this topic.