Forum Discussion
tristaanogre
14 years agoEsteemed Contributor
The problem may not be in WaitNamedChild or FindChild but in a dynamic nature of the object being searched for. It's possible, with the #32270 window, that there may be multiple instances with different captions, indices, etc. Or they could be spawned from a different process than expected. To better help figure this out, since you're using NameMapping (as evidenced by WaitNamedChild) it would be helpful to see a screenshot of the object being searched, the criteria being used in NameMapping to identify it, and perhaps the parent object itself.
These are some directions to look in.
As for a "better" way of using FindChild, it would be helpful to see the code in which you're using FindChild already. FindChild allows you to pass in an array of properties and a corresponding array of values with a depth (how deep in the hierarchy to search). So, there's any number of ways to "tweak" your use of FindChild by using different properties, different depth, wildcarding values, etc. So, if you could post what you've used in FindChild already and perhaps a screenshot of the properties of the object you're trying to find, we might be able to help you find a good set of criteria to use for your search.
These are some directions to look in.
As for a "better" way of using FindChild, it would be helpful to see the code in which you're using FindChild already. FindChild allows you to pass in an array of properties and a corresponding array of values with a depth (how deep in the hierarchy to search). So, there's any number of ways to "tweak" your use of FindChild by using different properties, different depth, wildcarding values, etc. So, if you could post what you've used in FindChild already and perhaps a screenshot of the properties of the object you're trying to find, we might be able to help you find a good set of criteria to use for your search.
Related Content
- 10 years ago
Recent Discussions
- 2 days ago
- 2 days ago
- 5 days ago