04-01-2009 01:43 PM
How can I check if the Constructor (selected in the Configure Class Constructor dialog box) was called and what it returned?
THANK YOU!!!
04-02-2009 02:41 AM
Hi,
As i learned in C++ there is NO retrun code in Contstructor at all !
Otherwise you have defined a memberfunction.
To check if your constructor has been called.
Set a Localvariable via SequnceContext. The Context should be a
parameter in your Contructor. Or better store in ReferenceObject
to the created class in TS contructor options.
Hope this helps
Juergen
04-02-2009 09:53 AM
Thanks! Yes, you are right, the constructor does NOT return anything, I learned that in C++ as well 🙂
What I am trying to figure out now is the following,
I loaded a .Net dll, I selected my class, I checked off "CreateObject" box. I selected a Constructor to be called. I created a local variable of type Object Reference and put it in the Object Reference field. I called a method of the class. So, this step got executed.
From C++ we also learned that when you call a constructor, an instance of that class gets created (or an object). You then use that instance to call other methods of that class. Correct?
Moving on to the next step in the TestStand sequence. I want to call another method of the same class, but in this case, I already created an instance of that class (supposedly, by checking off CreateObject box and having a local variable of type Object Reference in the Object Reference field in the first step). Now, all I would have to do is load that same .dll, select the same class, select the same local variable of type Object Reference as I specified in the first step and call the second method of that class. Right? I don't have to create an instance of that class because I want to use the same instance I created in the first step, BUT it is NOT working. It is telling me I don't have an instance and I am not creating an object, so it knows nothing about me creating an instance of that class in the first step. WHY NOT?
04-03-2009 01:20 AM