The new instance should be initialised to 0's etc.
what is the code you are using for the 2 instances creation ?
Regards
Paul McKenzie
=========================
Paul McKenzie
Jetbet II Developer
=========================
[EMAIL PROTECTED]
Ph: (04) 576-6822
T.A.B. National Office
106-110 Jackson Street
Petone
New Zealand
____________________Reply Separator____________________
Subject: [DUG]: Re: What could be wrong with this?
Author: [EMAIL PROTECTED]
Date: 12/07/2001 15:24
I seem to have got around this error somehow after ignoring it for a
while & tidying up some code. I would still be interested to know how &
why this can occur. Surely the ItemIndex property is always an integer!
On another topic, when creating another instance of an object, does the
data in the new instance contain the data that was contained in the
previous instance. This is what appears to be happening but I would
prefer the new object's elements to be blank/zero. Do I have to
initialise the all the elements by name?
Thanks,
Ross.
Ross Levis wrote:
> 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/(See
attached file: att1.eml)
att1.eml