Turning off rendering VT as a return?
Richard Gaskin
ambassador at fourthworld.com
Sun Aug 11 23:05:16 EDT 2013
J. Landman Gay wrote:
> On 8/11/13 7:02 PM, Richard Gaskin wrote:
>
>> So in short: Anyone here know how to turn off the rendering of VTs as
>> returns so I can see only true ASCII 10s as the line breaks, like I've
>> enjoyed for the last 25 years?
>
> I don't think there's a way to do it outside of a bulk replace with some
> other nonprinting character.
>
> I've already had a use for the new visual line breaks, so was glad to
> see them. But I don't think they're optional. :( Maybe someone who's
> poking around in the engine would consider adding a toggle switch?
In my follow-up I found the answer:
Explicit line-breaks in fields (5.5 DP2 – experimental)
The engine will now interpret a numToChar(11) character in a
field paragraph as an explicit line- break when the (effective)
dontWrap of the paragraph is false. This allows multiple ‘lines’
to be displayed within a single paragraph.
The formattedText property has been updated to map any explicit
line breaks to newlines.
Note that since the vGrid property turns dontWrap on for the
paragraph, using the line-break char in table paragraphs will have
no effect.
But this raises a question:
In general I love this new ability to have multiple apparent lines in
one physical paragraph.
However, in my case these are particularly useful in lists with the
vGrid set, which would give me something closer to HTML-style tables in
which a given cell can contain multiple lines, e.g.:
-----------------------------
r1item1 | r1item2a | r1item3
| r1item2b |
| r2item2c |
-----------------------------
r2item1 | r2item2a | r2item3
| r2item2b |
-----------------------------
r3item1 | r3item2a | r3item3
-----------------------------
r4item1 | r4item2a | r4item3
| r4item2b |
-----------------------------
So in my case it's showing the VTs when I don't want to see them (for
which there's a workaround), and not showing them when I do want to see
them (for which there's apparently no workaround).
I could probably use a datagrid for that layout but in the project I
need them for most I absolutely must use a single field.
Should we consider a more explicit way to toggle the rendering of VTs, e.g.:
set the showVerticalTabs of line 4 of fld 1 to true
If this were an explicit attribute of the text run we could maintain
backward compatibility by having it default to current behaviors, while
still allowing us to change it when we need to.
Any thoughts on the token name, or the functionality proposes?
I could use this very soon - anyone here want to write it and submit a
pull request? :)
--
Richard Gaskin
Fourth World
LiveCode training and consulting: http://www.fourthworld.com
Webzine for LiveCode developers: http://www.LiveCodeJournal.com
Follow me on Twitter: http://twitter.com/FourthWorldSys
More information about the use-livecode
mailing list