Forum Discussion

CBleunven's avatar
CBleunven
Contributor
13 years ago

Object organization different between manual start and ActiveXObject start of the application

Hi to all,

I start my application from my script using an ActiveXObject as described in this topic.



Until a couple of week everything was OK, but now I've a problem as some pathway to get some object are different.



For exemple I previously add

Sys["Process"]("MyApplication")["VCLObject"]("TConfigControleur0").

where now I have :

Sys["Process"]("MyApplication")["VCLObject"]("GlobalConfigDlgBox").



More surprisinlgy, if I launch the application "by hand", with the Object Spy I have well the name TConfigControleur0.



Unfortunatelly it was several weeks I've performed the last successfull test, and so I have no clear idea about the changes between "before" and "now". I've updated TC to 9.20.2460.7 but also W7.



Is there a change in the way the application is launched through the ActiveXObject ?



thanks a lor for your help,

Christophe





2 Replies

  • Hi Tanya,

    In fact the behavior is due to another modification in the code:

    I've changed a Process["VCLObject"] instruction for a Process["WaitVCLObject"], as I didn't want to get the error message if the window is not present, in order to populate some variables first.

    As this occurs few instructions after launching the application (I first wait that the process exists but no more), it seems this difference between both methods

    "A call to any WaitXXXObject method causes the object tree to refresh"

    is responsible of what I observe. If I introduce a break point or a 3 seconds delay just before calling the WaitVCLObject method, I get the TConfigControler0 name.



    I will see to find a way to wait for the window in a manner that allows me to retrieve the previous version, as additionnaly to name changes, I observe also that the tree is different with some object that are not present in the tree.



    Thanks for help,



    Christophe
  • Hi Christophe,



    The behavior you describe is very strange. Could you please post here screenshots of this window demonstrating how it's displayed in the Object Browser by running the application from the test manually?