I have two windows, one is launched from the other, but they are both of the same type (ObjTopPane), and the first is not the parent of the second, its just the mechanism through which the second one is launched (in fact, I even have the ability to close the first window and then use the second to reopen the first). Both windows have varying captions (I want to handle each window regardless of their caption at the time).
I have checked in the Object Browser and found that the foremost of the two always has an index of 1. If I bring the back one forward by clicking on it, the indexes switch and the new foremost window is index 1.
I have a name mapping WndClass=ObjTopPane, WndCaption=*, Index=1. It should identify the top instance of that class regardless of its caption or any other property.
What seems to be actually happenning is that, when using "Highlight on Screen" from the mapping it identifies the first window opened, whether or not it is the foremost window. The only way I can get the mapping to identify the second window is to close the first.
In this case the Object Browser and the Mapping seem to be disagreeing as to which window has an index of 1.
Thank you for the description - we have reproduced the problem.
It looks like Name Mapping doesn't refresh its references when window index changes.
As a workaround, you can force Name Mapping refresh the references from script. To do this, create a new Name Mapping configuration by copying the Default Configuration and change the configurations forth and back from script:
</font><blockquote><font size="1" face="Verdana, Arial, Helvetica">code:</font><hr /><pre style="font-size:x-small; font-family: monospace;"> NameMapping.CurrentConfigurationName = "Temp";
NameMapping.CurrentConfigurationName = "Default Configuration";</pre><hr /></blockquote><font size="2" face="Verdana, Arial, Helvetica">We'll investigate the problem further and I will let you know our results.