Forum Discussion
Abramova
Staff
14 years agoHi,
Do I need to call it on that specific control?
Yes, you need to call the RefreshMappingInfo method for the control that is "forgotten".
Will I have to do it for every control in that dialog?
If the references to other controls become invalid during the test run, you need to use this method for these controls as well. To avoid extra calls to the RefreshMappingInfo method, you can use the following Exists function to check if the mapped object exists. It will update the mapping information only if the mapping item has a reference to a non-existing object.
function Exists (NameMappingItem)
{
// Check if the name mapping item refers to an existing object
if (NameMappingItem.Exists)
return true
else
// Refresh the mapping information to see if the object has been recreated
NameMappingItem.RefreshMappingInfo();
return NameMappingItem.Exists;
}