SPONSORS:






User Tag List

Results 1 to 9 of 9
  1. #1
    mlj
    mlj is offline
    Junior Member
    Join Date
    Oct 2000
    Posts
    18
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Invalid handle from GetRowCount()

    Hi all, I need a bit of help- below are two snipets of code that I am going crazy with- does anyone see an issue or know of an issue with GetRowCount()??????


    The Object that it is trying to count is called OD.Table.GetRowCount()
    When I do this:

    testcase foo()
    Print(OD.Table.GetRowCount())

    It works fine.

    when I do this:

    integer blah()
    integer i = OD.Table.GetRowCount()
    return(i)
    It fails.
    In other words- when I call GetRowCount from a function it gets the error message **** Invalid Handle

  2. #2
    Senior Member
    Join Date
    Jul 1999
    Location
    New York, NY, USA
    Posts
    137
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Invalid handle from GetRowCount()

    I think 'i' is reserved in 4Test. I may be wrong, but try changing the variable.

  3. #3
    SQA Knight
    Join Date
    Jul 1999
    Location
    Grand Rapids, MI
    Posts
    3,727
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Invalid handle from GetRowCount()

    The letter 'i' is not a reserved keyword in SilkTest.

    -fyi, Terry

  4. #4
    mlj
    mlj is offline
    Junior Member
    Join Date
    Oct 2000
    Posts
    18
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Invalid handle from GetRowCount()

    I'm sorry , that was just an example- my actual code doesn't use "i"- you can pretend it says iRow.

  5. #5
    Member
    Join Date
    Dec 1999
    Location
    Seattle, WA
    Posts
    64
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Invalid handle from GetRowCount()

    any DHTML used on this page? view source and look for <DIV> tags.

    [This message has been edited by Matt Sullivan (edited 10-25-2000).]
    <BLOCKQUOTE]<font size=1 face=Verdana, Arial, Helvetica]quote:</font]<HR]It doesn't matter if I go to heaven or to hell, I have friends in both places.<HR]</BLOCKQUOTE]

  6. #6
    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: Invalid handle from GetRowCount()

    If you add a Print (i) before the Return(i) does it print the expected value?

  7. #7
    mlj
    mlj is offline
    Junior Member
    Join Date
    Oct 2000
    Posts
    18
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Invalid handle from GetRowCount()

    Thanks everyone- it ends up that the tag of the table changes after a record is added.
    This was really confusing to the function call. Since there are other tables with the tag that this table changes into. It simply returned bad info and was difficult to debug.

  8. #8
    Member
    Join Date
    Oct 2000
    Location
    South San Francisco, CA, USA
    Posts
    32
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Invalid handle from GetRowCount()

    A couple side issues with GetRowCount() and GetRowChildren():

    Do you need to be using the DOM with HtmlTables?

    How do you name the rows? Do you declare them or just use an index?

    Thanks,
    Michael

  9. #9
    mlj
    mlj is offline
    Junior Member
    Join Date
    Oct 2000
    Posts
    18
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Invalid handle from GetRowCount()

    You do not need to be using DOM.
    And When you declare the page the HTMLTable
    is an object on the normal declaration- there are methods to use against the tables.
    GetRowCount, etc.
    Hope that answers you.

 

 

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

Copyright BetaSoft Inc.