Forum Discussion

sastowe's avatar
sastowe
Super Contributor
13 years ago

weird object recognition issue in TC 8.2

I have an object that I can see in the Object Spy and Object Browser. I wrote some script that use the object's wText property which I can also see in the object browser and spy. When I run the script, it behaves incorrectly. So troubleshooting, I run in debug.



In debug Trim(frmLogon.VBObject("ControlContainer_3").VBObject("useridText").wText is showing in the watch window with value [object] with no children.



I can delay. I can Sys.Refresh. Nada.



While in debug mode, if I go into object browser and navigate to that object and click highlight on screen. When I return to the script in debug, the watch window chows the correct text value.



I have not changed TC versions. This code used to work.



Anywone?
  • TanyaYatskovska's avatar
    TanyaYatskovska
    SmartBear Alumni (Retired)

    Hi Stephanie,


     


    I think


    frmLogon.VBObject("ControlContainer_3").Refresh()


    frmLogon.VBObject("ControlContainer_3").VBObject("useridText").wText




    or


    frmLogon.VBObject("ControlContainer_3").VBObject("useridText").Refresh()


    frmLogon.VBObject("ControlContainer_3").VBObject("useridText").wText




    should help.

  • sastowe's avatar
    sastowe
    Super Contributor
    I will try that. I wonder though. It used to work. Any idea what would cause it to stop working?