SPONSORS:






User Tag List

Results 1 to 4 of 4
  1. #1
    Junior Member
    Join Date
    Aug 2000
    Posts
    22
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    *** Error: A constant may not be modified

    I have recorded the following window declaration for a text field:

    [-] CustomWin TextField
    [-] msw multitag "[TEdit]35"
    [ ] "[TEdit]$51184744"

    When I run a test case that accesses this object I get this error: "*** Error: A constant may not be modified"

    This error opens the file 4test.inc to the following line:
    const hHost = [HANDLE] 1

    I have no idea what is going on here, I have tried using a TextField object instead of a CustomWin and have tried many tag variations but I can't seem to figure out this error.

    Any suggestions would be appreciated.

    Thanks
    Mark

  2. #2
    Senior Member
    Join Date
    Mar 2000
    Location
    pisctaway, NJ USA
    Posts
    188
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: *** Error: A constant may not be modified

    Try changing the word TextField to TexFieldx
    I dont have Silk installed here, but it should be the problem.

    Anthony

  3. #3
    Senior Member
    Join Date
    Aug 1999
    Location
    San Diego, CA USA
    Posts
    219
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: *** Error: A constant may not be modified

    Your use of "TextField" as the identifier is most likely the problem. TextField is a reserved word in Silk and therefore you cnnto use it as an identifier.

  4. #4
    Junior Member
    Join Date
    Aug 2000
    Posts
    22
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: *** Error: A constant may not be modified

    I have found a work around for this error.

    I tried changing the identifier from 'TextField' but it didn't help.

    What I had to do was pull the TextField window definition out of the encapsulating class definition and create a new class derived from TextField.

    From here, there are no problems instantiating the derived class within the encapsulating class. For some reason SilkTest doesn't like the TextField class definition being inside of another class definition.

    // new derived class defintion
    winclass CTextField :TextField
    msw tag "[TEdit]#1"

    CustomWin Shell2 // encapsulating class
    CTextField TextField // instance of derived class



 

 

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:09 AM.

Copyright BetaSoft Inc.