Problem with text dump into comment box

electrogear's icon

According to the help file, using the message 'dump' with a text object should dump all lines of text to the output.

My .txt files contain paragraphs with a space between them (using carriage return). It seems only the last paragraph is output into the comment box, does anybody know how I can overcome this so all paragraphs are dumped to output?

Thanks, any help would be greatly appreciated.

Luke Hall's icon

It outputs them line by line, you will need to [zl group] them together before the [comment] object if you want all the lines in one go. Try hooking up a [print] object to see what I mean.

lh

electrogear's icon

The zl group seems to count individual words and spaces whereas the query message for the text object gives the number of lines, so I'm finding it difficult to get this setup working. Am I missing something?

Thanks for your help

Luke Hall's icon

Have a look at the example below or look in to the "append" message to [comment] which might help.

lh

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

electrogear's icon

Hmm, I still get the same problem as the zl group removes the line breaks anyway, and I want to preserve them. Plus it seems to put a space on both sides of the commas. I've spent hours on this now using loads of different combinations but I haven't sussed it, I can't believe there isn't a simple solution to doing something so basic. All I want to do is read the whole contents of a .txt file into a comment box without them being altered in any way....!!

Anyway, should I report this as a bug/typo as the help file says that dump should send all lines of text to the output, and it doesn't?

Luke Hall's icon

Well technically it does output all the lines of text, it just sends them one by one in a stream rather than formatting them into a single string. Here's one way of doing it.

lh

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