unicodeLabel not displaying unicode glyph?

LiveCode is the premier environment for creating multi-platform solutions for all major operating systems - Windows, Mac OS X, Linux, the Web, Server environments and Mobile platforms. Brand new to LiveCode? Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
stam
Posts: 2686
Joined: Sun Jun 04, 2006 9:39 pm
Location: London, UK

unicodeLabel not displaying unicode glyph?

Post by stam » Mon Sep 05, 2022 7:53 pm

Hi all,

not sure if this is correct...

if i have a field "test" and a button "test"

Code: Select all

put numToCodePoint("0x1F4BE") into field "test"
produces
field.png
field.png (1.74 KiB) Viewed 1767 times
I assumed it would be the same for labels but it seems not...

Code: Select all

set the unicodeLabel of button "test" to numToCodePoint("0x1F4BE")
does nothing... the same seems to apply to any control with a 'label' property, such as graphics...

Am i misunderstanding the dictionary? Is this expected behaviour?
Many thanks
Stam

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 9388
Joined: Fri Feb 19, 2010 10:17 am
Location: Bulgaria

Re: unicodeLabel not displaying unicode glyph?

Post by richmond62 » Mon Sep 05, 2022 7:58 pm

Code: Select all

 set the label of button "test" to numToCodePoint(0x1F4BE)
works. 8)

stam
Posts: 2686
Joined: Sun Jun 04, 2006 9:39 pm
Location: London, UK

Re: unicodeLabel not displaying unicode glyph?

Post by stam » Mon Sep 05, 2022 8:01 pm

ah i see, i'll try that - thanks Richmond

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 9388
Joined: Fri Feb 19, 2010 10:17 am
Location: Bulgaria

Re: unicodeLabel not displaying unicode glyph?

Post by richmond62 » Mon Sep 05, 2022 8:03 pm

SShot 2022-09-05 at 22.02.18.png
-
I don't know who or what told you to put quotation marks
around the Hexadecimal Unicode Glyph Address.
Attachments
Label Icons.livecode.zip
Stack.
(1.16 KiB) Downloaded 49 times
Last edited by richmond62 on Mon Sep 05, 2022 8:04 pm, edited 2 times in total.

stam
Posts: 2686
Joined: Sun Jun 04, 2006 9:39 pm
Location: London, UK

Re: unicodeLabel not displaying unicode glyph?

Post by stam » Mon Sep 05, 2022 8:04 pm

Yep - assigning the label instead of the unicodeLabel did it, thank you Richmond.

What is the point of the unicodeLabel then?
I had initially tried set the unicodeLabel of button "test" to "0x1F4BE", but that didn't work either...
Last edited by stam on Mon Sep 05, 2022 8:06 pm, edited 1 time in total.

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 9388
Joined: Fri Feb 19, 2010 10:17 am
Location: Bulgaria

Re: unicodeLabel not displaying unicode glyph?

Post by richmond62 » Mon Sep 05, 2022 8:06 pm

What is the point of the unicodeLabel then?
Dunno: probably much the same as the tail I had when I was a 5 month embryo
in my mother's womb. 8)
-
SShot 2022-09-05 at 22.06.46.png

stam
Posts: 2686
Joined: Sun Jun 04, 2006 9:39 pm
Location: London, UK

Re: unicodeLabel not displaying unicode glyph?

Post by stam » Mon Sep 05, 2022 9:01 pm

Ahhhhh I missed the deprecation - thanks for pointing that out… I only came across unicodeLabel when googling “how to” and the wiki showed this - but the deprecation wasn’t clear…

Anyway, learn something new every day….

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 9388
Joined: Fri Feb 19, 2010 10:17 am
Location: Bulgaria

Re: unicodeLabel not displaying unicode glyph?

Post by richmond62 » Mon Sep 05, 2022 9:12 pm

I don't just know who writes the LiveCode wiki, but is a bit patchy, so, while I use it I then generally check waht it says in the LC Dictionary.

Post Reply

Return to “Getting Started with LiveCode - Experienced Developers”