liminate pPath from every line of pPaths. Then insert each line
into an array.
email subject "directory tree -> array"
forum topic "f=7&t=33565"
*/
function arrayFromPaths pPaths, pPath -- a list of full paths, and the path
that was used to generate the list
On 04/02/2020 17:20, Bob Sneidar via use-livecode wrote:
Good points. I'll make some changes and resubmit. It never dawned on me that
someone would intentionally send an empty path, but it *might* happen
accidentally. Also, a path like /Users/BobSneidar being repeated would be very
edge case,
eductively
>>>> simple but I don't think it is:
>>>>
>>>> What is the simplest way to build an array that reflects the files and
>>>> folders within a given folder?
>>>>
>>>> There's a discussion about this h
rned, I'm offering help
here instead.
The list of full paths contains enough information to build an array
representation of the directory tree.
/**
Summary: Given a list of full paths, and given the partial path they share,
build an array representing the directory structure
pPaths: a retu
given the partial path they share,
build an array representing the directory structure
pPaths: a return-delimited list of full paths
pPath: the path that was used to generate the list of full paths
Returns (array): A array with a branch node for each folder and a leaf node for
each file
Descrip
Yes, but I couldn't get the recursion working right. My brain fried.
Bob S
> On Feb 3, 2020, at 11:18 , Ben Rubinstein via use-livecode
> wrote:
>
> On 22/01/2020 18:26, Richard Gaskin via use-livecode wrote:
>> We have many handlers that deliver directory trees as lists, but arrays are
>>
On 22/01/2020 18:26, Richard Gaskin via use-livecode wrote:
We have many handlers that deliver directory trees as lists, but arrays are a
different beast. Because the depth is both unknowable and varied, I can't
think of a way to do this without resorting to "do".
Surely this is what recursio
'm offering help
> here instead.
>
> The list of full paths contains enough information to build an array
> representation of the directory tree.
>
>
> /**
>
> Summary: Given a list of full paths, and given the partial path they share,
> build an array repre
path that was used to generate the list of full paths
Returns (array): A array with a branch node for each folder and a leaf node for
each file
Description: Eliminate pPath from every line of pPaths. Then insert each line
into an array.
email subject "directory tree -> array"
f
Wasn’t talking about the widget but building the underlying array that it would
display.
Thanks,
Brian
On Jan 22, 2020, 2:21 PM -0500, Richard Gaskin via use-livecode
, wrote:
> Where is the tree widget used in the Standalone Builder?
>
> --
> Richard Gaskin
> Fourth World Systems
>
> Brian Milb
Where is the tree widget used in the Standalone Builder?
--
Richard Gaskin
Fourth World Systems
Brian Milby wrote:
> Much of the needed work is already done in the standalone builder
> code. I don’t think it does a nested array, but it does handle things
> like processing links/shortcuts. I
Much of the needed work is already done in the standalone builder code. I
don’t think it does a nested array, but it does handle things like processing
links/shortcuts. I’ll try to take a look to see if a short recursive function
could be easily built.
Thanks,
Brian
On Jan 22, 2020, 1:59 PM -
Bob Sneidar wrote:
> I found a populate directory demo with a tree widget, but it fails,
> almost certainly because the embedded widget is out of sync with
> the current tree widget. Here you go.
If you turn one up it would be good to see the code.
So widgets can embed other widgets? I did not
Won't work. The behavior is missing.
Bob S
> On Jan 22, 2020, at 10:38 , Bob Sneidar via use-livecode
> wrote:
>
> I found a populate directory demo with a tree widget, but it fails, almost
> certainly because the embedded widget is out of sync with the current tree
> widget. Here you go.
I found a populate directory demo with a tree widget, but it fails, almost
certainly because the embedded widget is out of sync with the current tree
widget. Here you go.
> On Jan 22, 2020, at 10:34 , Bob Sneidar via use-livecode
> wrote:
>
> The tree view widget has an array at it's core. I
The tree view widget has an array at it's core. I seem to remember someone
creating a stack that uses the tree view widget to represent a folder
structure. You should be able to simply extract the array from that. I'll poke
around.
Bob S
> On Jan 22, 2020, at 10:21 , Bob Sneidar via use-live
We have many handlers that deliver directory trees as lists, but arrays
are a different beast. Because the depth is both unknowable and varied,
I can't think of a way to do this without resorting to "do".
--
Richard Gaskin
Bob Sneidar wrote:
> I thought someone created a handler for this? I
I thought someone created a handler for this? It requires iteration.
Bob S
> On Jan 22, 2020, at 10:17 , Richard Gaskin via use-livecode
> wrote:
>
> I stumbled across a code challenge for y'all, one that seems seductively
> simple but I don't think it is:
>
> What is the simplest way to b
I stumbled across a code challenge for y'all, one that seems seductively
simple but I don't think it is:
What is the simplest way to build an array that reflects the files and
folders within a given folder?
There's a discussion about this here:
https://forums.livecode.com/viewtopic.php?f=7&t
19 matches
Mail list logo