troubleshooting Question

How do I make a recursive procedure that will not generate a "Stack Overflow" error?

Avatar of jpedwards
jpedwards asked on
9 Comments1 Solution196 ViewsLast Modified:
  I am writing a procedure (D3) which goes through each form in the program, saves information about the form to a database, and then goes through each of its components.  (this is working)
   If the component is a TControl, then I save some information about it to a database. (this is working)
   I then want to see if the component has any child components, check if each of them is a TControl and if so, save some of their information to the database.  I want to do this recursively to capture information about each component in the whole program. (this is not working)
   It seems to me that the second routine should be recursive so that it can call itself.  I have read what little there is in the Help about making a procedure recursive by using forward declarations but it is not clear to me what to do, or where to put it.  Can anyone help?
Join our community to see this answer!
Unlock 1 Answer and 9 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 9 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros