SPONSORS:






User Tag List

Results 1 to 2 of 2
  1. #1
    Junior Member
    Join Date
    Jan 2003
    Posts
    13
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Creating instances of defined classes

    Is there a way to create new instances of defined classes in silkTest at run-time, similar to that of the new keyword in Java.

    For example, if I have a class defined as follows:

    winclass myStruct
    String s
    int i = 0

    void doNothing()
    return true

    Now I want to create many of these "myStruct" classes, but I don't know how many until runtime. How do I add an arbitrary number of these objects to a list at runtime?

    I want to do something similar to this java code in 4Test:

    Vector v = new Vector();
    v.add (new mystruct());

    I guess what I'm really asking is, how do I emulate the "new" java keyword in 4Test?

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

  2. #2
    Senior Member
    Join Date
    Feb 2000
    Posts
    1,497
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Creating instances of defined classes

    Try this link entitled "Classes, Objects, Dynamic Instantiation and Constructors
    " for relevant articles:
    http://customers.segue.com/protected...sley_intro.htm


    John


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

 

 

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

vBulletin Optimisation provided by vB Optimise v2.6.0 Beta 4 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
User Alert System provided by Advanced User Tagging v3.0.9 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Questions / Answers Form provided by vBAnswers (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
vBNominatevBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Feedback Buttons provided by Advanced Post Thanks / Like (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Username Changing provided by Username Change (Free) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
BetaSoft Inc.
Digital Point modules: Sphinx-based search
All times are GMT -8. The time now is 02:02 PM.

Copyright BetaSoft Inc.