On 2022-07-10 21:33, Richard Gaskin via use-livecode wrote:
Brian Milby wrote:
You could also turn the path into an array (but lose the error
checking above):
function getValue pArray, pPath
split pPath by comma
return pArray[pPath]
end getValue
Thanks, Brian. I keep forgetting we can us
If pPath[1] = “a” and pPath[2] = “b”
Then pArray[pPath] is the same as saying pArray[“a”][“b”]
I’m not sure when it was added. It is relatively recent (7 or 8 I think, but
not sure)
Thanks,
Brian
Sent from my iPhone
> On Jul 10, 2022, at 4:46 PM, J. Landman Gay via use-livecode
> wrote:
>
On 7/9/22 7:11 PM, Brian Milby via use-livecode wrote:
function getValue pArray, pPath
split pPath by comma
return pArray[pPath]
end getValue
I keep forgetting we can do that. It's cool, but I don't understand how it works. Splitting the
path by comma produces a numbered array, and yet
Brian Milby wrote:
> You could also turn the path into an array (but lose the error
> checking above):
>
> function getValue pArray, pPath
> split pPath by comma
> return pArray[pPath]
> end getValue
Thanks, Brian. I keep forgetting we can use an array as an element
specifier.
Has that be
I don't think there is an existing one liner, but it can be done a couple
ways.
Here is a recursive function defined in the PI code for Custom Props:
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
On 7/9/22 3:17 PM, J. Landman Gay via use-livecode wrote:
On 7/8/22 12:34 PM, Richard Gaskin via use-livecode wrote:
I see the Tree widget supports a hilitedElement property, which is useful for managing the
selection in the UI.
Is there a one-liner for obtaining not the element path but the v
On 7/8/22 12:34 PM, Richard Gaskin via use-livecode wrote:
I see the Tree widget supports a hilitedElement property, which is useful for managing the
selection in the UI.
Is there a one-liner for obtaining not the element path but the value?
I'm using an older version, but here the hilitedEle