Re: Dynamic scripted nested array keys?

2021-04-24 Thread Keith Clarke via use-livecode
Thanks Brian this conversion to pPath to an array of keys hit the nail on the head. So, for anyone else looking to show the (full non-truncated) content of a node in a read-only Tree widget in a tooltip, by clicking the actionInspect icon, is… on actionInspect pPath put the arrayData of widget

Re: Dynamic scripted nested array keys?

2021-04-24 Thread Paul Dupuis via use-livecode
On 4/24/2021 9:31 AM, Brian Milby via use-livecode wrote: I guess I should reply to myself and say why this works. At some point the feature was added that you could use an array as an index into an array. The format is a one based ordered array of keys. So tPath[1] is the first level key,

Re: Dynamic scripted nested array keys?

2021-04-24 Thread Brian Milby via use-livecode
I guess I should reply to myself and say why this works. At some point the feature was added that you could use an array as an index into an array. The format is a one based ordered array of keys. So tPath[1] is the first level key, tPath[2] is the second level, etc. If you wanted to get

Re: Dynamic scripted nested array keys?

2021-04-24 Thread Brian Milby via use-livecode
Easiest way is to use split... Given a tree widget this will take a path from field 1 and put the value at that path in field 2 on mouseUp pMouseButton local tTree, tLoc put the arrayData of widget 1 into tTree put field 1 into tLoc split tLoc by comma put tTree[tLoc] into field 2

Re: Dynamic scripted nested array keys?

2021-04-24 Thread Paul Dupuis via use-livecode
I have only partially been following this thread, but if you need to find the array 'content' in an arbitrary nested array from a comma delimited path of array keys, recursion is the way to do it: function fetchArrayContentFromPath pArray,pPath   -- pArray is an array   -- pPath is a comma

Dynamic scripted nested array keys?

2021-04-24 Thread Keith Clarke via use-livecode
Hi folks, Inspired by Jaque’s (working - thank you!) response to my question “Show Tree widget row contents on hover” I’ve isolated the final piece of that puzzle that leaves me baffled. Specifically, can LiveCode accept a dynamically built key for a nested multi-dimensional array? Copy the