Tab() and cr() and line wrapping

I’m probably missing something obvious.

However, when displaying lines that have tab characters in them, line wrapping occurs before the end of line, if there are more than “n” number of tabs in a line.

It happens in TextDisplay objects, TextEditor objects, as well as with the DisplayData().

It does not matter how wide the windows are, the text wraps anyway. Even if “Line Breaks” is set to “Don’t Wrap”

Any thoughts what’s going on?


Ah … it looks like the line-width is tied to actual page width … when the font size is reduced enough, the line doesn’t wrap.

Is there a way to de-couple line-widths from page-setup/printing and font sizes?


Tabs really aren’t supported. The only exception is if you use Rich Text and explicitly set up tab stops.

Hmmm … ok. I guess I wouldn’t expect DisplayData to do any “processing” or “interpreting” of the text besides just spitting it out. IMHO. :slightly_smiling_face:

When I say “not supported”, I mean “not supported by NSTextView for plain NSString values”. DisplayData does not do any processing or interpreting of the text, it just hands it to NSTextView. The behavior you are describing is what is provided by Apple.

Personally, I usually use the replace( function to change tabs to some other character (or characters) when using the DisplayData statement. Maybe that should be an option built into the statement.

Yeah. I often do, too. But, sometimes, I just want to see the data “as is”, and the line break characters added by NSTextView are annoying. :roll_eyes: :wink:

You know, there are times I want to “dump” tabular data for a quick view to ensure it’s correct.

It would be cool if DisplayData could have a flag where it interprets “tab” characters and generates a “table” appearance of the data. But … it’s not that important. When I really need to see the data, I just hit the “Copy” button and paste into Numbers, and it makes a workable table. :slightly_smiling_face:

If you need to see where your tabs are use replace(TheText,¬,¬+“¬”)

Yes, if only Panorama had a feature like that… :thinking:

wow … so much I do not know … thanks, Jim!