SPONSORS:






User Tag List

Results 1 to 9 of 9
  1. #1
    Senior Member
    Join Date
    Jul 1999
    Location
    Bellingham, WA USA
    Posts
    1,323
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    \"Error: Invalid assignment\"

    I'm getting an error message, or more acurately, an exception is being thrown and this is the message that is contained in the exception: Error: Invalid assignment

    Here's the situation. Using two different logins for the same test. Each returns an HtmlTable with four columns of info.

    Login one has only one row of info.
    Login two returns the same table, but with two rows.

    Here is the code that is throwing the exception but ONLY on Login two.

    It's throwing the exception on GetRowText(i).

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

  2. #2
    Senior Member
    Join Date
    Apr 2001
    Location
    San Diego,CA,USA
    Posts
    108
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: \"Error: Invalid assignment\"

    try removing the MemberNameColumn from the line as GetRowText(iRow) expects the table.

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

  3. #3
    Senior Member
    Join Date
    Jul 2001
    Location
    Elizabeth, CO, USA
    Posts
    653
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: \"Error: Invalid assignment\"

    GetRowText is also defined for the HtmlColumn class.

    As a debugging step, put the return value into an ANYTYPE variable and then do a TypeOf to find out what's going on.

    - Dave


    ------------------
    Amelior Technology
    dreed@ameliortech.com
    WaltzingRhino.com
    A concerned Borland customer, a fly in the ointment, a wrench in the works.

  4. #4
    Senior Member
    Join Date
    Jul 1999
    Location
    Bellingham, WA USA
    Posts
    1,323
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: \"Error: Invalid assignment\"

    Ahh, thanks Dave. That's a good thought. I'll try that.

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

  5. #5
    Senior Member
    Join Date
    Jul 2001
    Location
    Elizabeth, CO, USA
    Posts
    653
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: \"Error: Invalid assignment\"

    Please let us know what oddity it returns. I'm betting that due to some SilkTest psychosis you're getting a LIST OF STRING back. That's what it'll return if called on an HtmlTable object rather than an HtmlColumn.

    Why? Well, that's another good question. Dunno.

    - Dave


    ------------------
    Amelior Technology
    dreed@ameliortech.com
    WaltzingRhino.com
    A concerned Borland customer, a fly in the ointment, a wrench in the works.

  6. #6
    Senior Member
    Join Date
    Jan 2001
    Posts
    750
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: \"Error: Invalid assignment\"

    in Silk5.5 GetRowText doesn't work with index zero. Make sure that's not the case, or go out of range.

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

  7. #7
    Senior Member
    Join Date
    Jul 1999
    Location
    Bellingham, WA USA
    Posts
    1,323
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: \"Error: Invalid assignment\"

    Okay folks. This is bad!

    You know how we tend to rely on the spell checker in word proc apps so we get sloppy with our spelling? Well, I tend to do the same with the 4Test compiler.

    In the code above, "sName" is a variable that is undeclared. Working with Dave's suggestion of "changing" the type to ANYTYPE, I discovered, to my horror and discredit that sName was not declared anywhere in that scope or as a global ... nothing, nowhere. sName has no type!

    Yet, the script compiles!! Not only that, but with the first of the login IDs, it runs without error. The error occurs only on the second login ID!

    Has anyone ever seen this behavior where a script with an undeclared variable will still compile?

    Now, there is another place within an isolated loop where that same variable is used, but it is limited to that scope and then discarded. Is it a Silk glitch that might possibly have found *that* variable and believed it to be valid here as well?


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


    [This message has been edited by DJGray (edited 07-11-2002).]

  8. #8
    Super Member
    Join Date
    Jul 2001
    Location
    Earth
    Posts
    1,882
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: \"Error: Invalid assignment\"

    I hope you sent a script demonstrating this to tech support so this can be fixed....

    ------------------
    James Soderborg
    http://www.ameliortech.com
    jamesso@ameliortech.com

  9. #9
    Junior Member
    Join Date
    Apr 2002
    Posts
    7
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: \"Error: Invalid assignment\"

    4Test compiler has problems with scope of variables anyway:

    function x()
    x = x + 1
    Integer x


    compiles well. What a crap

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

 

 

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

Copyright BetaSoft Inc.