Forum Discussion

jlucas's avatar
jlucas
New Contributor
14 years ago

Need for persistent screen object variables

The name mapping works well in TC. I use that to identify dialogs, then use the find child method to search for child objects.


I would like to extend the find child technique to dialogs, but I have no way to save the the identified dialogs for use on subsequent calls. Global variables don't support object types, and VBS doesn't support persistent variables. I could use programmatic name mapping, but that requires building the object definition one layer at a time, which is difficult. 


Are there any plans to provide a way to make object variables persistent between function calls? An alternative would be to allow objects found using the find child method to be added directly to the name mapping structure as a whole (much like is done during recording). Thanks!

1 Reply


  • Hi Jeff,



    You can use the Extended Find feature of the Name Mapping functionality instead of using FindChild. Information on this feature can be found in the Using Extended Search Criteria for Mapped Object Identification help topic.



    >>

    Are there any plans to provide a way to make object variables persistent between function calls?

    <<

    Since values of persistent variables are stored in text project files, storing binary object data in these text files is not a very good idea. However, I have registered your suggestion in our database. Thank you.



    As a solution, you can use a persistent variable of the String type to store the value of an object's FullName property. When you need to access an object, evaluate the stored name to get the actual object: