Unicode and the Properties Palette

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

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 10116
Joined: Fri Feb 19, 2010 10:17 am

Unicode and the Properties Palette

Post by richmond62 » Sat Dec 12, 2020 10:36 am

Screenshot 2020-12-12 at 11.29.39.png
-
My Devawriter Pro 'thang' uses a non-standard Unicode font as it contains about 5,000 glyphs in the
Personal Private Use Area, which is "all very sexy" for people who wish to prepare digitised versions of Indic texts,
but is " a bit of a pox" for people like myself when editing code.

https://www.facebook.com/devawriter/

If the field content part of the properties palette were give 2 possibilities life would suddenly get a whole lot better:

1. The ability to set the font in the entry field.

2. The ability to set the fontSize in the entry field.
Last edited by richmond62 on Sat Dec 12, 2020 11:08 am, edited 2 times in total.

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 10116
Joined: Fri Feb 19, 2010 10:17 am

Re: Unicode and the Properties Palette

Post by richmond62 » Sat Dec 12, 2020 10:44 am

Screenshot 2020-12-12 at 11.44.03.png
-
Mockup. 8)

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 10116
Joined: Fri Feb 19, 2010 10:17 am

Re: Unicode and the Properties Palette

Post by richmond62 » Sat Dec 12, 2020 12:57 pm

It is a real pain-in-the-bum that this does not render in the Properties palette:
-
Screenshot 2020-12-12 at 13.56.18.png
Screenshot 2020-12-12 at 13.56.18.png (4.79 KiB) Viewed 7127 times

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 10116
Joined: Fri Feb 19, 2010 10:17 am

Re: Unicode and the Properties Palette

Post by richmond62 » Sat Dec 12, 2020 5:03 pm

I have a feeling that if I could just locate a template stack for the Properties Palette
I could edit it myself to add those features.

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 10116
Joined: Fri Feb 19, 2010 10:17 am

Re: Unicode and the Properties Palette

Post by richmond62 » Sat Dec 12, 2020 8:29 pm


richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 10116
Joined: Fri Feb 19, 2010 10:17 am

Re: Unicode and the Properties Palette

Post by richmond62 » Sat Dec 12, 2020 9:37 pm

I wonder why is seems impossible to add new controls to this stack?
-
Screenshot 2020-12-12 at 22.32.36.png

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 10116
Joined: Fri Feb 19, 2010 10:17 am

Re: Unicode and the Properties Palette

Post by richmond62 » Sat Dec 12, 2020 9:58 pm

Having, finally, worked out a way to hack this:
-
Screenshot 2020-12-12 at 22.56.16.png
-
Having saved it as a substack of a dummy stack, there now seems no way to turn it into a mainstack
and then return it to "its place in the great scheme of things." :(

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 10116
Joined: Fri Feb 19, 2010 10:17 am

Re: Unicode and the Properties Palette

Post by richmond62 » Sat Dec 12, 2020 10:11 pm

Ah: managed to swap out the old stack and swap in my modded one: and it has NO
effect on the Property Inspector at all.

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 7393
Joined: Sat Apr 08, 2006 8:31 pm
Contact:

Re: Unicode and the Properties Palette

Post by jacque » Sun Dec 13, 2020 6:27 pm

I don't know a lot about how the inspector works except that it is created and laid out dynamically. Its content varies depending on the widgets the user has installed and its own properties are set dynamically depending on the selected object. It's probably ignoring your changes because it's updating itself constantly.

A more general solution is to submit a report asking that the inspector honor unicode more faithfully.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com


bn
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 4174
Joined: Sun Jan 07, 2007 9:12 pm

Re: Unicode and the Properties Palette

Post by bn » Mon Dec 14, 2020 2:26 pm

Richmond,

If I understand what you want correctly you could change "com.livecode.pi.textcontents.behavior".
Handler "on editorUpdate", changes marked by "-- added BN"

To make those changes permanent in your copy of LC you would have to change to permissions of that file in the application bundle (on Mac) to allow write access. Then save the changed file from the IDE.
The change affects only that particular instance of LC, any other instance/version would have to be changed the same way.

Code: Select all

on editorUpdate
   lock screen
   local tValue, tEffective, tEnabled, tProp, tFieldID
   put the editorValue of me into tValue
   put the editorEnabled of me into tEnabled
   put the editorEffective of me into tEffective
   
   put the cSelectedObjects of me into tFieldID -- added BN
   lock messages
   if sTextType is "styledText" then
      set the styledText of field "htmltext" of me to tValue
      -- added BN
      if the number of lines of tFieldID = 1 then
         set the textFont of field "htmlText" of me to the effective textFont of tFieldID
      end if
      --  and added BN
   else
      put tValue into field "htmltext" of me
   end if
   set the enabled of field "htmltext" of me to tEnabled
   if tEffective is true then
      set the textcolor of field "htmltext" of me to "150,150,150"
   else
      set the textcolor of field "htmltext" of me to empty
   end if
   unlock messages
   unlock screen
end editorUpdate
I did not test with your special font but see no reason why it should not work.
This change will apply the textFont of the inspected field to the Properties Inspector instance of styled text.
Please note that some fonts might not display properly in the Properties Inspector due to space restrictions (Zapfino being one font that does not display properly)

Kind regards
Bernd

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 10116
Joined: Fri Feb 19, 2010 10:17 am

Re: Unicode and the Properties Palette

Post by richmond62 » Mon Dec 14, 2020 9:10 pm

Bernd

Thank you very much.

However, that is a stop-gap at best, and the ability to be able to see in the text entry panel in the Property Inspector
for fields as a permanent and fixed feature, especially one that can be changed on-the-fly with 2 drop-down
menus, would greatly enhance the IDE.

bn
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 4174
Joined: Sun Jan 07, 2007 9:12 pm

Re: Unicode and the Properties Palette

Post by bn » Mon Dec 14, 2020 10:15 pm

richmond62 wrote:
Mon Dec 14, 2020 9:10 pm
However, that is a stop-gap at best, and the ability to be able to see in the text entry panel in the Property Inspector
for fields as a permanent and fixed feature, especially one that can be changed on-the-fly with 2 drop-down
menus, would greatly enhance the IDE.
This is just a hack for the time being. I am reluctant to propose a full featured pull request since I think it is up to Edinburgh to decide on the features of the Properties Inspector.
Kind regards
Bernd

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 10116
Joined: Fri Feb 19, 2010 10:17 am

Re: Unicode and the Properties Palette

Post by richmond62 » Tue Dec 15, 2020 12:40 pm

I think it is up to Edinburgh to decide on the features of the Properties Inspector.
Well, we could focus on the word 'Community' as well as various sententious pronouncements from LC central
and, apart from looking at our navels and intoning "Runtime Revolution" 108 times, ask ourselves how much
of this decision making should be their's (OK, OK, the Buck stops with Kevin and Mark), and how much should,
or could be our's.

Of course this is a bit like gambling on whether Vishnu is actually listening (or even exists) as there have been extremely
sparse indications from LC central as to how much the 'Community' should 'get-down-and-dirty'.

As I threw my juju beads away a very, very long time ago (1982) . . . .

Because of this sparsity (err: is that a real word? or should I use 'paucity' instead?) of "signs and wonders" (um; possibly extending the
metaphor a bit too far) I for one am reluctant to get my boots too wet and muddy.

Should you feel that what I have suggested is a good thing, pop over to the bug/enhancement report and give it a virtual thumbs up.

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 7393
Joined: Sat Apr 08, 2006 8:31 pm
Contact:

Re: Unicode and the Properties Palette

Post by jacque » Tue Dec 15, 2020 6:38 pm

Well, we could focus on the word 'Community' as well as various sententious pronouncements from LC central
LC encourages community contributions; in fact, that was one of the reasons to go open source. I believe they expected more involvement than they received. A compatible update to the inspector would be welcomed, I'm sure.

Kudos to the handful of people who actually jump in to help.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

Post Reply