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 your method, this for informational purposes only. What I am actually creating is an XML editor using a tree view, and also I am creating a method for solving the Property Inspector issue some have raised, where clicking a tree node does not hilite the node name or the value if there is one. What I am doing is almost identical to what the the property inspector does. I've worked it out so that hiliting a tree node whose value is an array puts the name of the hilited node into the Key field, selects the text of the key field, and puts empty into the Value field. If however the value of the hilited node is a value, it puts the value into the Value field and selects the text of the value field. This IMHO is the way the property inspector *ought* to work. Bob S > On Aug 30, 2018, at 07:41 , Bob Sneidar via use-livecode > <[email protected]> wrote: > > Oh there you go! That works. > > Bob S > > >> On Aug 29, 2018, at 13:58 , Brian Milby via use-livecode >> <[email protected]> wrote: >> >> 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 getHilightedValue _______________________________________________ use-livecode mailing list [email protected] Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
