SPONSORS:






User Tag List

Results 1 to 2 of 2

Thread: Properties bug?

  1. #1
    Junior Member
    Join Date
    Oct 2000
    Location
    UK
    Posts
    19
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Properties bug?

    I'm having trouble adding a property to a window declaration. I'm using Silk 5 to automate some software and have defined the window fred.inc thus...

    const wMainWindow = fred

    window MainWin fred
    tag "$c:\fred\fred.exe"
    etc...

    property sNumber
    string Get()
    return sNumber
    void Set(string value)
    sNumber = value

    When I use 'fred.sNumber = "1234"' in a testcase I get a stack overflow. The problem seems to be that when the agent gets to the 'sNumber = value' part of the property set command it calls the Get() function. The sNumber property value that is returned by the Get() seems to cause the Get()function to be called recursively until the stack overflows. I don't understand why the compiler seems to require the value of sNumber in order to perform an assignment. Is this a bug with silk or am I doing something completely stupid?

    Thanks,

    Andrew

  2. #2
    Junior Member
    Join Date
    Jun 2000
    Posts
    6
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Properties bug?

    Andrew:
    I think a variable is needed to store sNumber. 4Test says: "Properties allow information associated with a window to be accessed as if it were stored in a variable." It doesn't say a property is a variable.

    Thanks,
    Leon

 

 

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 07:12 AM.

Copyright BetaSoft Inc.