Saving the text inside a text editor

May 15, 2012 at 1:02pm

Saving the text inside a text editor

Hi everyone,

I’m trying to figure out how to save the text written inside a text editor window.
I’m working with the example external simpletext as a basis. Once the object is created inside my patcher, the text is stored inside a char** variable inside the object’s structure. However, even if I save my patcher, the text is not saved along (after closing Max, all the text is lost).
Is there a way to do this ?

I read in the documentation about the edsave function, called each time the user chooses to save the text file – however, if possible, I’d rather not use external text files, and have all data stored inside the external.

Thanks !

#63606
May 15, 2012 at 1:51pm

Hello,

you can store data in the .maxpat files as a t_dictionary …

1. for UI external you can use jsave ( ) method :

http://cycling74.com/forums/topic.php?id=26378

2. otherwise :

http://cycling74.com/forums/topic.php?id=26727

HTH.

#229271

You must be logged in to reply to this topic.