Re: Show invisible characters (tab, space, return) in field

2018-12-09 Thread hh via use-livecode
> Kaveh wrote: > You are right. It's getting complicated :-) So why does 200A allow > wrapping and 200B does not? Perhaps a team member can come in? And corrects this/explains this better: 0x200B is probably not in LC's word-break table (for word wrapping) because it is usually used to indicate

Re: Show invisible characters (tab, space, return) in field

2018-12-09 Thread Kaveh Bazargan via use-livecode
On Sat, 8 Dec 2018 at 21:26, hh via use-livecode < use-livecode@lists.runrev.com> wrote: > > Kaveh wrote: > > There is a also a zero width character. :-) that is 200B. > > So using a monospace font all chars line up. > > This works if and only if your field has dontWrap true, else your > line

Re: Show invisible characters (tab, space, return) in field

2018-12-08 Thread hh via use-livecode
> Kaveh wrote: > There is a also a zero width character. :-) that is 200B. > So using a monospace font all chars line up. This works if and only if your field has dontWrap true, else your line will not (soft-)break at the new "spaces" between the words. But then (if dontWrap is true) you don't

Re: Show invisible characters (tab, space, return) in field

2018-12-08 Thread Kaveh Bazargan via use-livecode
Hi Hermann There is a also a zero width character. :-) that is 200B. So using a monospace font all chars line up. And even more interesting, when I press the backspace key, it generally treats the composite pair as one character, so jumps back over both with one backspace!! On Sat, 8 Dec 2018

Re: Show invisible characters (tab, space, return) in field

2018-12-08 Thread Kaveh Bazargan via use-livecode
On Sat, 8 Dec 2018 at 16:00, hh via use-livecode < use-livecode@lists.runrev.com> wrote: > You could moreover add the following to the field's script. > > on rawkeyup k > switch k > case 65288 -- backspace > put word 4 of the selectedChunk into cx > if char cx of me is among the

Re: Show invisible characters (tab, space, return) in field

2018-12-08 Thread hh via use-livecode
> Kaveh wrote: > On the live conversion, you are adding a unicode character before > a space, say. That means two characters and therefore two character > widths. Is there a way of making spaces zero width, or the new characters > overlapping the space etc? Ideally I want the text widths of lines

Re: Show invisible characters (tab, space, return) in field

2018-12-08 Thread hh via use-livecode
You could moreover add the following to the field's script. on rawkeyup k switch k case 65288 -- backspace put word 4 of the selectedChunk into cx if char cx of me is among the items of \ (numToCodePoint(0x23CE),numToCodePoint(0x21E5),numToCodePoint(0x00B7))

Re: Show invisible characters (tab, space, return) in field

2018-12-08 Thread Kaveh Bazargan via use-livecode
Thank you for spending the time on this. Like all your posts it is an education! Great idea to convert just a visible part of text! I am going to study well and work on this. On the live conversion, you are adding a unicode character before a space, say. That means two characters and therefore

Re: Show invisible characters (tab, space, return) in field

2018-12-08 Thread hh via use-livecode
> Kaveh wrote: > I need the user to edit as normal and with normal functionality but see the > normally > invisible characters. So seems I would need a native solution. :-( This works for me (TMHO, this demonstrates the beauty of LC). Script your field with the following. on rawkeyDown k

Re: Show invisible characters (tab, space, return) in field

2018-12-08 Thread hh via use-livecode
> Kaveh wrote: > What I am looking for is a native replacement of a return, say, > with a visible characters wherever it appears. You have to replace return with if you wish to preserve the line breaks. Similarly • have you to replace space with if you wish to preserve the word breaks, • have

Re: Show invisible characters (tab, space, return) in field

2018-12-08 Thread Kaveh Bazargan via use-livecode
Thank you. Did not know about that. It works, but seems for a specific char or chars. I have tried: on mouseup lock screen repeat with i = 1 to the number of chars of fld "text" if char i of fld "text" is return then set the imagesource of char i of fld "text" to "myreturn"

Re: Show invisible characters (tab, space, return) in field

2018-12-07 Thread Paul Dupuis via use-livecode
You can set the imageSource of the non-printing characters. They will remain spaces, tabs, and returns, but can have a small image (you will have to make or find) displayed in their place. See imageSource in the Dictionary. set the imageSource of character to {imageID |imageName |imageURL

Re: Show invisible characters (tab, space, return) in field

2018-12-07 Thread Kaveh Bazargan via use-livecode
Thanks Bob. I did mean non-printing characters. I think just space, tab and return. The problem with replacing with with a character is that of course it is not a space any more, so text would not wrap as normal. I need the user to edit as normal and with normal functionality but see the normally

Re: Show invisible characters (tab, space, return) in field

2018-12-07 Thread Bob Sneidar via use-livecode
Not natively. You would have to replace every non-printing character (that's what you mean by invisible I suppose) with a square digbat or something. If you want to filter for only printable characters, I have a function that dies that, and also there are regex strings for that sort of thing.