sam_parsons
12 years agoOccasional Contributor
Scripting Issues with WaitAliasChild
Hi there,
I have another question. I've been trying to write a script, and my goal is to check if a certain link on a page exists. I have this while loop in one of my methods that looks like this:
while(Aliases.WaitAliasChild("tasklink", 2000).Exists) {
...
}
However, it is unable to find the child, so it errors out:

But the documentation for WaitAliasChild specifically says:
Result Value
The child object that has the specified alias. If the specified object does not exist, the method returns a stub object and the method does not post an error message to the log, unlike when you directly refer to a mapped object by an alias. To determine whether the returned object exists in the system, use its
So why does it post an error message to the log? In my case, I don't want to consider not being able to find the object an error. I do not want execution to stop.
Thanks,
Samuel Parsons
I have another question. I've been trying to write a script, and my goal is to check if a certain link on a page exists. I have this while loop in one of my methods that looks like this:
while(Aliases.WaitAliasChild("tasklink", 2000).Exists) {
...
}
However, it is unable to find the child, so it errors out:
But the documentation for WaitAliasChild specifically says:
Result Value
The child object that has the specified alias. If the specified object does not exist, the method returns a stub object and the method does not post an error message to the log, unlike when you directly refer to a mapped object by an alias. To determine whether the returned object exists in the system, use its
Exists
property.So why does it post an error message to the log? In my case, I don't want to consider not being able to find the object an error. I do not want execution to stop.
Thanks,
Samuel Parsons