There is already a PR merged into 9.1 that will auto select the text of any
field in the PI when you enter it via tab. This also selects the key field
in the Custom Properties inspector when the highlight changes. If you tab
into the value, then the value is selected.
Changing the logic to selec
Hi Brian.
Actually for my purposes I need the last key of the array node. For example, if
I have an array:
myArray [level1] [level2] [level3]
and the value is "Test1"
then I need to return an array:
aArrayNode [level3]
I worked it out using my method so I'm not asking for a modification to
Oh there you go! That works.
Bob S
> On Aug 29, 2018, at 13:58 , Brian Milby via use-livecode
> wrote:
>
> Here is another way to do it:
>
> function getHilightedValue pTreeWidgetReference
> local tElement, tArray
> put the arrayData of pTreeWidgetReference into tArray
> put the hilite
Here is another way to do it:
function getHilightedValue pTreeWidgetReference
local tElement, tArray
put the arrayData of pTreeWidgetReference into tArray
put the hilitedElement of pTreeWidgetReference into tElement
split tElement by comma
return tArray[tElement]
end getHilightedVal
Here is the handler from the PI:
on fetchArrayDataOnPath pPath, pArray, @rData
local tKey
put item 1 of pPath into tKey
if the number of items in pPath is 1 then
if tKey is not among the keys of pArray then
return "no such key"
else
put pArray[tKey] into rDat
Hi all.
Anyone working with tree views will immediately encounter an oddity, where the
hilitedElement returns a comma delimited list of the array keys to the clicked
item in the tree view. A comma delimited list of keys is almost completely
useless if you want to get the value of the actual it