Forum Discussion
alinder
15 years agoContributor
Boris's article describes a system similar to what we are working with. I'm sorry to say I've tested out the solutions you've suggested and they aren't viable or working. FindChild doesn't work with only one arg, and using it on the Name property doesn't match the alias (multiple aliases possible per object, per the topic). Using eval doesn't work unless we pass in enough information to construct the entire Alias string.
Our alias tree can be 4 to 6 nodes deep, but our conventions are such that for a given displayed state of the application, any object can be uniquely identified with its alias name and the name of one of its parents. Rearranging the Alias tree to be a consistent shallow depth is not an option as object names have been intentionally re-used, such as when a similar block of controls appears on different dialogs at different times.
The main conclusion I have come to is don't use multiple Aliases for the same object anymore; use something common to both cases like btnNextFinish instead. We can make it work after a fashion, there are no expectations for a magic fix; the purpose of my posting was to communicate that we were trying to take the tool further than it can go via stable means.
Our alias tree can be 4 to 6 nodes deep, but our conventions are such that for a given displayed state of the application, any object can be uniquely identified with its alias name and the name of one of its parents. Rearranging the Alias tree to be a consistent shallow depth is not an option as object names have been intentionally re-used, such as when a similar block of controls appears on different dialogs at different times.
The main conclusion I have come to is don't use multiple Aliases for the same object anymore; use something common to both cases like btnNextFinish instead. We can make it work after a fashion, there are no expectations for a magic fix; the purpose of my posting was to communicate that we were trying to take the tool further than it can go via stable means.