Property Inspector bug for keys with commas in the key name

Niggemann, Bernd Bernd.Niggemann at uni-wh.de
Sun Nov 5 07:41:47 EST 2023


Hi Paul,

I looked a bit further into the problem with commas in key names of custom properties.
It turns out that the widget "treeview" has the option to choose a delimiter for paths. Default is comma.

If you feel adventurous you could hack the properties inspector fairly easily to work with commas in the key names;

Recipe:

open any custom property in the PI

close the PI

Select from Menu "View": Show IDE Stacks in Lists

open Project Browser

Use the project browser to edit the script of com.livecode.pi.customprops.behavior

Now add to handler editorInitialize at the end

   -- more code
   set the pathDelimiter of widget 1 of me to tab -- add
end editorInitialize

Now add the line:

set the itemDelimiter to tab

to handlers:

setArrayDataOnPath
setArrayKeyOnPath
deleteArrayKeyOnPath
addArrayKeyOnPath
fetchArrayDataOnPath
keyChangedOnPath


To be sure you can do a search for "item" in the script and every handler that refers to "item" needs 

set the itemDelimiter to tab


Reopen the PI for a custom property containing comma in a key name and it should work to display key and value in PI and also lets you change the value.

If you want this change to be persistent for that particular version of LC you would have to save the changes to com.livecode.pi.customprops.behavior from the Script Editor.
Otherwise the next time you start that version of LC the changes would be gone.

I tested shortly and it worked for me. Maybe try this first on a LC version that is not your current working version.

I chose tab as delimiter since I doubt that tab will be used in a key name...


Kind regards
Bernd






More information about the use-livecode mailing list