Board index » delphi » Accessing ListBox.Items.Objects on ListBox's events

Accessing ListBox.Items.Objects on ListBox's events

How come I get all the time "List index out of bounds" error messages
when trying to access ListBox.Items.Objects [] in the same ListBox's
events (for example in OnClick)? Same line of code works ok outside
events..
 

Re:Accessing ListBox.Items.Objects on ListBox's events


In message <37df804c.188050...@forums.inprise.com>, Pekka Haapalainen
stated:
Quote
> How come I get all the time "List index out of bounds" error messages
> when trying to access ListBox.Items.Objects [] in the same ListBox's
> events (for example in OnClick)? Same line of code works ok outside
> events..

Pekka,

show us the code you are using (as small as possible to reproduce) and
maybe someone can help you.

--
Regards
Ralph (TeamB)
--

Re:Accessing ListBox.Items.Objects on ListBox's events


Strange - I'm now at home and can not reproduce the problem...
Actually that's good news but if the problem exists again tomorrow at
work, then it's bad news ;-(

Re:Accessing ListBox.Items.Objects on ListBox's events


In article <37dfd4ef.3574...@forums.inprise.com>, Pekka Haapalainen
(Pekka Haapalainen) says...

Quote
> Strange - I'm now at home and can not reproduce the problem...
> Actually that's good news but if the problem exists again tomorrow at
> work, then it's bad news ;-(

Hi Pekka,

The solution is obvious ... stay at home <g>

Cheers,
Carl

Re:Accessing ListBox.Items.Objects on ListBox's events


On Thu, 16 Sep 1999 00:20:23 +0100, car...@dircon.co.uk (Carl

Quote
Caulkett) wrote:
>The solution is obvious ... stay at home <g>

Hi Carl,

maybe I should do that, and actually few times I have done it.

Anyway - I changed the code yeasterday to work different way to avoid
the problem and I'm not gonna change it back just to check for the
error, so maybe I go to work today after all ;) I propably was some
silly error in my code...

 Cheers,
 Pekka

Other Threads