Thank you very much Roman. It's working. Ann. --- On Sat, 5/1/10, Roman Zilber <[email protected]> wrote:
From: Roman Zilber <[email protected]> Subject: Re: Not be able to reference to class in lib? To: [email protected] Date: Saturday, May 1, 2010, 7:30 PM 1. Add to myLib.qfl Function createMyClassObject() Set createMyClassObject = new MyClass End Function 2. In Action Set oMyClass = createMyClassObject() 3. In the test you need to add myLib.qfl to resources File -> Settings -> Resources Roman On Fri, Apr 30, 2010 at 8:18 PM, ann hoang <[email protected]> wrote: Please help! Many thanks We have 1 class called MyClass in library. >From main function, when I try to reference to that class DoB() Dim myObj Set myObj = New MyClass then Quick test throws error undefined variable MyClass. However I can see the message "DoB" popup. I moved the class to Main then I don't have problem any more. We have a hundred of classes and cannot put all of them in 1 file. Please share the solution. 'Codes in file myLib.qfl Function DoB msgBox ( "DoB") end Function Class MyClass ' has some properties ' has some sub ... public function DoA end function End Class -- You received this message because you are subscribed to the Google "QTP - HP Quick Test Professional - Automated Software Testing" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/MercuryQTP?hl=en -- You received this message because you are subscribed to the Google "QTP - HP Quick Test Professional - Automated Software Testing" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/MercuryQTP?hl=en -- You received this message because you are subscribed to the Google "QTP - HP Quick Test Professional - Automated Software Testing" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/MercuryQTP?hl=en
