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/

Reply via email to