How to get a hilitedElement value from a Tree View's arrayData?

Keith Clarke keith.clarke at
Tue Dec 21 10:43:18 EST 2021

Thanks for the response & resource link, Brian - much appreciated.

It’s good to know that I wasn’t barking up the wrong tree (view!), regarding the need to handle the returned hilitedElement array comma-delimited keys list.

I’m new to arrays (and indeed most development concepts), so it was a good learning experience to try to work this out - though the documentation for arrays could be more helpful regarding syntax and passing in variables, as much trial and error was needed.

I like the mechanism you’ve used for generalising the array key to be independent of tree node depth - consider that learned and reused! :)

> On 21 Dec 2021, at 15:19, Brian Milby via use-livecode <use-livecode at <mailto:use-livecode at>> wrote:
> I saw this originally and meant to dig a bit.  Sorry for causing additional work for you.  Here is a widget script that does pretty much what you are doing but leverages a way of array access that isn’t obvious.
> <>
> You should not need to use a case statement.  In my case the value was HTML in one case but plain text otherwise.
> It is part of a more involved stack, but the card with this widget may be helpful for your purposes.
> Thanks,
> Brian
> Sent from my iPhone

More information about the use-livecode mailing list