char array as embedding attr

May 5, 2010 at 11:56pm

char array as embedding attr

My obj has char array in its struct that is meant to be saved w/ the patcher in which the obj lives.
i am declaring it as an attr and calling CLASS_ATTR_VARSIZE and CLASS_ATTR_SAVE, but I notice when the attribute is saved w/ the patcher it is the full size of the buffer, regardless of the number passed as the 2nd to last argument of CLASS_ATTR_VARSIZE. Is there anything I can do to ensure that the number passed eliminates trailing characters?

Thanks for any help,

May 6, 2010 at 11:56pm

This is the code that I cal in order to prepare the atom array to be saved:
CLASS_ATTR_CHAR_VARSIZE(c, "user-ints", 0, t_myobj, intbuf, intbuf_len, BUFSIZE);


May 7, 2010 at 5:38am

sorry; i meant char array, charbuf, and charbuf_len in my 2nd post. :s
word in the hills is that i need to write my own custom getter and setter… off i go!


You must be logged in to reply to this topic.