Doriano Blengino ha scritto:
> Actually I expressed myself badly. Example:
>
> Tree1:
> - item0
> - item1
> - item1.0
>
> Tree1.count is 3 (global count)
> Tree1.Children.count is 2 (tree1 has two children)
> Tree1.Children[0] is item0
> Tree1.Children[0].count is 0
> Tree1.Children[1] is item1
> Tree1.Children[1].count is 1
> Tree1.Children[1].Children[0] is item1.0
>
> AChild = Tree1.Children[1]
> for subchild in Achild
> ... ' just the single child of item1: item1.0
> next
>
> ask("Sure to copy " & tree1.count & " file/directories?) ' we will
> copy 3 items
> for child in Tree1.children
> processchild(subchild) ' this line will execute two times
> next
>
> sub processchild(child as TreeChild)
> dim subchild as TreeChild
>
> ' do something with it
> alert("Copying " & child.text & "...)
> ' are there subchildren? Do them recursively
> for subchild in child.children
> processchild(subchild)
> next
> end
>
The Doriano's way could be a good choice IMHO.
However, I think that the differences between the two components should
be resolved: how it will be implemented it's not so relevant for me
(currently both implementations works correctly), the important is to
have a unique behavior.
Thanks everybody, especially to the gambas developers who are doing a
great job.
--
Matteo
------------------------------------------------------------------------------
The Planet: dedicated and managed hosting, cloud storage, colocation
Stay online with enterprise data centers and the best network in the business
Choose flexible plans and management services without long-term contracts
Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com
_______________________________________________
Gambas-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gambas-user