Re: Tree View Values

2018-08-30 Thread Brian Milby via use-livecode
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

Re: Tree View Values

2018-08-30 Thread Bob Sneidar via use-livecode
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

Re: Tree View Values

2018-08-30 Thread Bob Sneidar via use-livecode
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

Re: Tree View Values

2018-08-29 Thread Brian Milby via use-livecode
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

Re: Tree View Values

2018-08-29 Thread Brian Milby via use-livecode
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

Tree View Values

2018-08-29 Thread Bob Sneidar via use-livecode
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