The online community for software testing & quality assurance professionals
 
 
Calendar   Today's Topics
Sponsors:




Lost Password?

Home
BetaSoft
Blogs
Jobs
Training
News
Links
Downloads



Software Testing >> Automated Testing

Pages: 1
gadagoju
Member


Reged: 05/01/01
Posts: 41
Loc: Houston, TX USA
Object Orieneted Window Declaraions ...
      #276402 - 05/02/01 12:23 AM

I have a window declared in file. I want to associate methods to this window, but I want to declare it in a different file like C++ way. Did any one tried this.

------------------
SG

Sorry, we are using SILK Test

and I had refered to Page 306 as you mentioned and I can only extend a pre-defined library class like TextField I cannot extend a window definition for eg:

[-] window DialogBox QueryBuilder // Query Builder Dialog
[ ] tag "Query Builder*"
............
[ ] //Functions
[ ]
[-] AcceptValues()
........
in QB.inc

Now I want to add another function and in a new file, I tried:

use "qb.inc"
[-] winclass QueryBuilder : QueryBuilder
[-] myFunc()
[ ] print("My Name")

and save it as qb1.inc and compiled it and I am getting errors. Any help is really appreciated.

[This message has been edited by gadagoju (edited 05-01-2001).]

Post Extras: Print Post   Remind Me!   Notify Moderator  
DavidG
Junior Member


Reged: 07/12/02
Posts: 0
Loc: Paris (France)
Re: Object Orieneted Window Declaraions ...
      #276403 - 05/01/01 02:05 PM

What automation tool are you using? If it is SilkTest, then you can do this (not sure about the other automation tools).

Rather than me going into detail here, check out page 306 of your SilkTest book. If you still need help, then we can get into that more here.

------------------
David Genrich
Blackhog
932 Hamlin Court
Sunnyvale, CA 94089
dgenrich@blackhog.com


Post Extras: Print Post   Remind Me!   Notify Moderator  
mvpl
Member


Reged: 11/16/00
Posts: 32
Loc: Shelton, CT, USA
Re: Object Orieneted Window Declaraions ...
      #276404 - 05/02/01 01:31 PM

If the functions are specific to QueryBuilder window you would just place the functions under QueryBuilder. To reference these function you would use the syntax QueryBuilder.MyFunction()

To create them specific to any DialogBox you would use:

code:

[-] winclass DialogBox : DialogBox
[ ]
[-] MyFunction()
[ ]

Try create a new window class:

code:

[-] winclass MyQueryBuilder : DialogBox
[ ] setting DontInheritClassTag = TRUE
[ ]
[-] MyFunction()
[ ]


You should be deriving from an existing class to inherit all of its functions plus the entended ones you want to add into it.

To use this extended class you would need to change the Class type from DialogBox to MyQueryBuilder. Yo could have actually named the winclass and window Identifier the same.
But why make life confusing.

code:

[-] window DialogBox QueryBuilder
[ ] tag "Query Builder"


[-] window MyQueryBuilder QueryBuilder
[ ] tag "Query Builder"


Hope this helps.

------------------


Post Extras: Print Post   Remind Me!   Notify Moderator  
Pages: 1



Extra information
0 registered and 23 anonymous users are browsing this forum.

Moderator:  Elfriede Dustin, AJ, Joe Strazzere 

Print Topic

Forum Permissions
      You cannot start new topics
      You cannot reply to topics
      HTML is disabled
      UBBCode is enabled

Rating:
Topic views: 2163

Rate this topic

Jump to

Contact Us | Privacy statement SQAForums

Powered by UBB.threads™ 6.5.5