Board index » cppbuilder » Re: Tlist in BCB 6 vs BCB 5

Re: Tlist in BCB 6 vs BCB 5


2003-09-09 06:11:46 AM
cppbuilder8
"Robert Byers" < XXXX@XXXXX.COM >wrote in message
Quote
I've got a program that I wrote in BCB 5 and now am trying to
convert it to BCB 6. The one problem that I'm encountering is
a TList where I get the message "index out of range". The thing
works fine in BCB5, so I'm wondering if there is some change
of behaviour in v6.
What does your actual code look like that is generating the exception? If
you are actually going out of bounds, and BCB5 did not catch it before, then
that would be a bug in BCB5, not BCB6. There have been additions in
functionality for TList in BCB6, but the Items[] property itself has not
been changed in regards to accessing indexes.
Gambit
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (www.grisoft.com).
Version: 6.0.515 / Virus Database: 313 - Release Date: 9/1/03
 
 

Re:Re: Tlist in BCB 6 vs BCB 5

I was afraid of that. The code in question is spread out over a large
number of methods. The failure occurs during the "showform" event. I'll
just have to track it down.. I was hoping for an easy way out. Will let you
know what the problem was.
Thanks
Bob
"Remy Lebeau (TeamB)" < XXXX@XXXXX.COM >wrote in message
Quote

"Robert Byers" < XXXX@XXXXX.COM >wrote in message
news:3f5cf58a$ XXXX@XXXXX.COM ...
>I've got a program that I wrote in BCB 5 and now am trying to
>convert it to BCB 6. The one problem that I'm encountering is
>a TList where I get the message "index out of range". The thing
>works fine in BCB5, so I'm wondering if there is some change
>of behaviour in v6.

What does your actual code look like that is generating the exception? If
you are actually going out of bounds, and BCB5 did not catch it before,
then
that would be a bug in BCB5, not BCB6. There have been additions in
functionality for TList in BCB6, but the Items[] property itself has not
been changed in regards to accessing indexes.


Gambit


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (www.grisoft.com).
Version: 6.0.515 / Virus Database: 313 - Release Date: 9/1/03


 

Re:Re: Tlist in BCB 6 vs BCB 5

"Robert Byers" < XXXX@XXXXX.COM >wrote in message
Quote
I was afraid of that. The code in question is spread out
over a large number of methods. The failure occurs during
the "showform" event. I'll just have to track it down.. I was
hoping for an easy way out. Will let you know what the problem was.
Well, the easiest way to track it down is to do your own bounds checking.
Whenever you are going to access the Items[] property, double-check that the
index value you are about to pass to it really is>0 and <Count-1. If the
check fails, do something about it, such as pop up a messagebox to tell you
exactly where the faulty index was encountered.
Gambit
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (www.grisoft.com).
Version: 6.0.515 / Virus Database: 313 - Release Date: 9/1/03
 

{smallsort}