Getting all child's child's etc. object's property values
Hi,
I was testing to see if i can a complete list of properties/value for my desktop application , doing it manually would basically take .. along time so i thought creating a function that call itself, either implementation is incorrect but if someone can help with this it would be nice.
count=0 function fractal(innerobj) 'go through all child count=count+1 log.Message "pass: " & count & ", childcount: " & innerObj.childCount if innerObj.childcount>0 then for i=0 to childcount log.Message "innerobj name: " & innerobj.NativeCLRObject.Name set childObj=innerObj.Child(i) call fractal(ChildObj) next else log.Message innerobj.fullname end if end function
the idea is to have the function call itself, with each pass sending the child of the object to itself.
I thought this would go through the loop of each child and its child and its child until it reaches the end and then loop backward and go to the nxt child.
It seems that once it hit the last child of the first tree, it stop the excecution.
You need to keep track of childObj so you can go back to the next one when you've been down one tree. You're resetting it every time so by the time you get to the end of the first tree, you have no where else to go.
Just curious, what will this list be used for?