Forum Discussion

steve4king's avatar
Occasional Contributor
14 years ago

Bug/Error clicking a cell/field in a Delphi grid

I've got a grid which may have one record and it may have three thousand.

I need to be able to select the last value from the 7th column.

Both of these work fine and I'm able to pull the row/column count.



However, I'm unable to actually select the cell.

(To simplify I hardcoded the numbers, so my code snippet is exactly this:


When I execute I see this Error:

"An Error has Occurred"

Possible reasons:

1. The application stopped responding.

2. The application was compiled incorrectly (see the Open Applications topic in the help system).

3. An error occurred in TestComplete.

Technical information:

97 0x80020006 (Unknown name.) FRowCount.



(on a different note.. can I set the default to period(.) rather than brackets/quotes?  So much harder to read after it converts it that way)

3 Replies

  • Hi Stephen,

    Most probably, you have not compiled the tested application with debug information as necessary and therefore the control's native properties are not available to TestComplete. Please make sure the application is compiled as described in the "Using Debug Info Agent With Delphi Applications" ( help topic.

    can I set the default to period(.) rather than brackets/quotes?  So much harder to read after it converts it that way

    I recommend that you use JScript instead of C#Script unless you are going to create C# Connected applications or Self-Testing applications. The JScript syntax is more intuitive, and the two languages have equal functionality. Also, note that C#Script scripts can be launched in JScript projects and vice versa. The same applies to C++Script. Please see the "Selecting the Scripting Language" help topic for more information.

  • steve4king's avatar
    Occasional Contributor
    Hmm.. so I'm not going to be able to apply this testing on a production build of our software?(We don't want to leave debug information in a shipped product)  Seems odd that I can retrieve the row-count from the control, but I cannot perform a mouse-click, focus, or get the grid1.wValue(x,y) for a particular part of the control.

    I ended up using keystrokes in a 'for loop' tied to the row count to select the control.  Slower than I'd like but it works for 95% of the cases I need.



  • Hi Stephen,

    The point is that TestComplete needs the info to use internal methods and properties of the control and get information on cell coordinates, etc. If you need to test the release version of your application, you can try using the StripTDS utility - it allows creating release builds of Delphi applications with external debug information. You can find more information on the utility in the "About StripTDS" ( help topic.