Forum Discussion

Manfred_F's avatar
Manfred_F
Regular Contributor
10 years ago

handling multiple dialog instances

Hi,

how can I handle multiple dialog instances in my AUT? I want to open several detail dialogs from a table dialog and work with the data (different detail objects).

Using Aliases, I always get the instance opened at first, having the highest reading for the index property. The other dialog instances are not available.

 

One approach could be to use Find() to search in the object browser. The easiest way would be to use the existing alias' criteria for a search on the alias' parent object and to iterate using the Index property. Can I access the alias criteria via script?

 

Any other ideas?

 

Regards,

Manfred

  • Hi,

    this is my solution:

    1) Start with the dialog alias' Control

    2) For the Control's parent, get an array with all visible children having the control's wndClass

    3) Filter the array for Elements having the control's MappedName

    4) exclude the start control itself

     

    Voilá: an array with all "other" instances of a dialog alias' dialog type.

     

    Regards,

     

    Manfred

  • Manfred_F's avatar
    Manfred_F
    Regular Contributor

    Hi,

    this is my solution:

    1) Start with the dialog alias' Control

    2) For the Control's parent, get an array with all visible children having the control's wndClass

    3) Filter the array for Elements having the control's MappedName

    4) exclude the start control itself

     

    Voilá: an array with all "other" instances of a dialog alias' dialog type.

     

    Regards,

     

    Manfred