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

2021-12-21 Thread Brian Milby via use-livecode
I’ll admit that I modeled my code after code in the IDE somewhere (property editor). Now I wonder why they didn’t just use split. Sent from my iPhone > On Dec 21, 2021, at 1:14 PM, Keith Clarke via use-livecode > wrote: > > Ah, yes of course - split a list variable with comma to form an

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

2021-12-21 Thread Keith Clarke via use-livecode
Ah, yes of course - split a list variable with comma to form an array, being the inverse of combine tArray with comma to create a list. "The Worm is the Spice! The Spice is the Worm!” - the Dune weird array thing! Thank you, Alex - another synapse is ignited by the enlightenment… for a while,

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

2021-12-21 Thread Alex Tweedly via use-livecode
Hmmm - maybe I'm missing something, but Can't you use the feature of "using a numeric-indexed array as key" ? (AFAIK it's an undocumented feature, except in the original release notes for 5.x, which are no longer on the downloads site, and which I can't find my copy of - so if anyone has

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

2021-12-21 Thread Keith Clarke via use-livecode
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

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

2021-12-21 Thread Brian Milby via use-livecode
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.

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

2021-12-21 Thread Keith Clarke via use-livecode
Hi folks, For future reference, below is how I managed to get this sorted. The solution seems rather ugly, but it works for the fixed depth of Tree View data I’m interested in. The root cause seems to be down to the way LiveCode handles array keys passed in from variables. It doesn't seem

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

2021-12-20 Thread Keith Clarke via use-livecode
I’m using the Tree View widget to provide a quick and dirty read-only display of the various arrays of information that can be extracted from the PDF Widget. Each PDF page contains too much text to read & understand within the constraints of a single line in a Tree View control. So, on

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

2021-12-20 Thread J. Landman Gay via use-livecode
I'm confused about what the goal is. The hilitedElement contains the text of the selection. The array is already in place, so you don't really need to add to it. The reason you're seeing text in the message box is because the last line contains an unspecified "put". Without a destination for

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

2021-12-20 Thread Keith Clarke via use-livecode
Hi folks, I’m struggling to access the value from a Tree View widget’s data array as the hilitedElement changes - though I think my issue is more about working with arrays than the Tree View widget. The following test script (on the Tree widget) successfully gets the Tree’s arrayData into