Help! Give me a line break!

Pedro Santos's icon

Hi forum!

I need to input some generated information to a textedit object. The text is supposed to be multi-line.
I've read several threads about the subject of outputting muli-line text from textedit but not the opposite.
Anyway, I've managed to do it, but I can't think of a way to get rid of the symbol quotes without losing the line-breaks. It seems it's one or the other.

The obvious solution would be for textedit to interpret the incoming text as a symbol and get rid of the quotes internally, as is the case with the comment object... (or at least to have that option in the inspector).

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

Is there any workaround that you can think of? Thanks!

jvkr's icon
Max Patch
Copy patch and select New From Clipboard in Max.

Does this help in any way?

Pedro Santos's icon

Hi, JVKR. Thanks for your response.
Your solution gets around the problem of the symbol and the corresponding quotes by sending each element separately and combining them with the append command.
It solves my initial problem but creates another: after the first line, the following lines always start with a space character...

Mike S's icon
Max Patch
Copy patch and select New From Clipboard in Max.

Still has the space unfortunately.

Maybe try something in Javascript...

Pedro Santos's icon

Hello again JVKR and Mike S.Thanks for your responses.
Just to clarify: the problem of the additional space is due to the lines being sent separately. If we send "a" and then append "b", Max naturally spaces them out. Here, it's happening the same thing. We send "a", "line-break" and "b". Between the "line-break" and "b", Max is separating with a space each element.
Therefore, I guess the problem could only be fixed if:

- textedit could receive and interpret ASCII numbers directly. We, then, could send the correct information.
- textedit could interpret a symbol (to retain the line-breaks) and take out the quotes internally (my original problem).

Anyway, I'd love to be proven wrong. Anyone?

Pedro Santos's icon

Hello Cycling'74.
Since this seems to be an impossible task, consider it a feature/bug fix request.

dhjdhjdhj's icon
dhjdhjdhj's icon

Perhaps just a new message called

appendln (say)

that behaves like a println statement