SPONSORS:






User Tag List

Thanks Thanks:  0
Likes Likes:  0
Dislikes Dislikes:  0
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)
    Total Downloaded
    0

    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)
    Total Downloaded
    0

    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
  •  
Search Engine Optimisation provided by DragonByte SEO v2.0.40 (Pro) - vBulletin Mods & Addons Copyright © 2017 DragonByte Technologies Ltd.
Resources saved on this page: MySQL 11.54%
vBulletin Optimisation provided by vB Optimise v2.7.1 (Pro) - vBulletin Mods & Addons Copyright © 2017 DragonByte Technologies Ltd.
User Alert System provided by Advanced User Tagging v3.3.0 (Pro) - vBulletin Mods & Addons Copyright © 2017 DragonByte Technologies Ltd.
vBNominate (Lite) - vBulletin Mods & Addons Copyright © 2017 DragonByte Technologies Ltd.
Feedback Buttons provided by Advanced Post Thanks / Like (Pro) - vBulletin Mods & Addons Copyright © 2017 DragonByte Technologies Ltd.
Username Changing provided by Username Change (Free) - vBulletin Mods & Addons Copyright © 2017 DragonByte Technologies Ltd.
BetaSoft Inc.
Digital Point modules: Sphinx-based search
All times are GMT -8. The time now is 09:32 PM.

Copyright BetaSoft Inc.