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
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,
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
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
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
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