Try popping a breakpoint on the line:
Item := ....
Do this by clicking in the left margin (a red spot will appear) after the
click.
Then run and when the program stops at that point, press F8 to step through
the code and see if that highlights the cause of the problem. Hover the
mouse over variables and you will see their current value.
Also, prior to running, it can be helpful to try a syntax check to trap
incompatible type issues etc.
-----Original Message-----
From: Ross Levis [mailto:[EMAIL PROTECTED]]
Sent: 12 July 2001 11:00
To: Multiple recipients of list delphi
Subject: [DUG]: What could be wrong with this?
procedure TCategoriesForm.CategoryListClick(Sender: TObject);
var
item : integer;
begin
item := CategoryList.itemindex; {CategoryList is a listbox with 2
items in it}
At runtine, when clicking on an item in the Listbox, the above line
produces an exception EConvertError 'is not a valid integer value'.
Can someone shed some light please.
Cheers,
Ross.
---------------------------------------------------------------------------
New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
Website: http://www.delphi.org.nz
To UnSub, send email to: [EMAIL PROTECTED]
with body of "unsubscribe delphi"
Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/
---------------------------------------------------------------------------
New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
Website: http://www.delphi.org.nz
To UnSub, send email to: [EMAIL PROTECTED]
with body of "unsubscribe delphi"
Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/