|
Heya guys,
I was wondering if there was a way to do recursion
in witango 5?
I have a DOM variable im reading from a file and
trying to show as it's tree structure and using indenting to show it at its
different levels.
I have nodes that are "folders" and nodes that are
"notes", folders can be openned and closed and notes are just there (like
folders and files in an OS) so i need to show all oppened folders and their
contents etc.
what i was thinking so far was have a tcf
function that took a DOM variable and made an array of it's children.
Then it loops through the children and if it hits an open folder, call the tcf
function again with the DOM object of that folder so it will do the subfolder
then when its done continue with the current folder.
my only problem here is that local variables will
get overwritten when i call the tcf function again inside itself
right?
Method scope would be overwritten too and instance
seems like it might work except id have to make a tcf object for each call of
the function which that would add alot of overhead right?
I am looking at only 4 or 5 nested levels at
maximum if that helps at all.
Its late so not sure if i explained this very well
but does anyone have any ideas?
Thanks!
Alan ________________________________________________________________________ TO UNSUBSCRIBE: Go to http://www.witango.com/maillist.taf |
- RE: Witango-Talk: Witango 5 and recursion Alan Wolfe
- RE: Witango-Talk: Witango 5 and recursion David Shelley
- Re: Witango-Talk: Witango 5 and recursion Alan Wolfe
- Re: Witango-Talk: Witango 5 and recursion Alan Wolfe
- Re: Witango-Talk: Witango 5 and recursion John McGowan
- Re: Witango-Talk: Witango 5 and recursion Alan Wolfe
- Re: Witango-Talk: Witango 5 and recursion John McGowan
- RE: Witango-Talk: Witango 5 and recursion David Shelley
