numtochar(1) invisible in LC 6.6.2

Anything beyond the basics in using the LiveCode language. Share your handlers, functions and magic here.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
jmburnod
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 2729
Joined: Sat Dec 22, 2007 5:35 pm
Contact:

numtochar(1) invisible in LC 6.6.2

Post by jmburnod » Tue Oct 21, 2014 1:47 pm

Hi All,
I noticed numtochar(1) is invisible in LC 6.6.2
Is there a preference that I have to check ?
Thanks for your light
Jean-Marc
https://alternatic.ch

lexogram
Posts: 13
Joined: Fri Oct 17, 2014 6:58 pm

Re: numtochar(1) invisible in LC 6.6.2

Post by lexogram » Tue Oct 21, 2014 1:58 pm

Hi Jean-Marc,

At the site asciitable (dot) com you can see that the meaning of numToChar(1) is "Start of Heading", which is meaningful when transmitting messages over a network . This is an invisible, non-printing character. The first visible character is numToChar(33) or !

There are other characters with lower numbers, like TAB and CARRIAGE RETURN and SPACE but these just create white space.

Does this make sense to you now?

James

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10331
Joined: Wed May 06, 2009 2:28 pm

Re: numtochar(1) invisible in LC 6.6.2

Post by dunbarx » Tue Oct 21, 2014 2:20 pm

Jean-Marc.

In earlier versions, the "default" char for such low numbered ASCII chars was a little square. This always meant to me that the char was, as James said, unprintable, and I do not mean that it was profane. But this has changed in 6.6. Now you get nothing at all.

I think this is a bad thing. At least when you:

Code: Select all

on mouseUp
   put numtochar(1) into fld 1
end mouseUp
You got an indication that something was placed in the field, even though it is a "disallowed" char. Now you get the feeling that the handler itself failed. Further to this, if you:

Code: Select all

on mouseUp
   answer chartonum(fld 1)
end mouseUp
you get a "1" in both cases, but the field still seems empty. It is not, though, if you click in the field at the right side of the line, you will see the cursor a bit off the left edge. There is a char there, but you have to dig to find it, and it is invisible.

Craig

jmburnod
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 2729
Joined: Sat Dec 22, 2007 5:35 pm
Contact:

Re: numtochar(1) invisible in LC 6.6.2

Post by jmburnod » Tue Oct 21, 2014 2:40 pm

Hi James and Craig

Thanks for your fast replies
I use this numtochar(1) as itemdel, because we can't type it with keyboard.
I understand this changed since LC 5.5
No incidence for scripting but I lose some visibility
All the best
Jean-Marc
https://alternatic.ch

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10052
Joined: Sat Apr 08, 2006 7:05 am
Contact:

Re: numtochar(1) invisible in LC 6.6.2

Post by FourthWorld » Tue Oct 21, 2014 4:16 pm

The visibility of characters considered non-printing is usually dependent on the OS the app is currently running in, as well as the font used for the display. So even in the old world you should have seen some variance there.

With v7.0's Unicode support you now have access to a much broader character set than previously, which can include things like the pilcrow ("¶") or others as characters which are not only visible, but also meaningful and consistently rendered across platforms.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn

Post Reply