Board index » delphi » TCheckListBox and List Index Out of Bounds Error on NT 4.0

TCheckListBox and List Index Out of Bounds Error on NT 4.0

Hi all,

I have posted a *small* attachment in the borland.public.attachments NG
under the same subject that goes along with this message:

This **very** simple Delphi 6 program using a TCheckListBox control gives a
"list index out of bounds (-1)" error when I execute it under Windows NT 4.0
Workstation.  It does not give an error on my Windows XP Home workstation.
All the program does is change the text of the existing items in the list
box.  I have installed IE5.5 on the Windows NT workstation thinking it might
be an older version of the common controls, but the error still occurs.

I'd be grateful if someone using NT 4 and D6 could build and run this
project and let me know if they get the error as well.

Does anyone see anything funky about the code that would cause this to
happen?

Thanks,
Vinnie Murdico

 

Re:TCheckListBox and List Index Out of Bounds Error on NT 4.0


Quote
In article <3cbf9212_2@dnews>, Vinnie Murdico wrote:
> I have posted a *small* attachment in the borland.public.attachments NG
> under the same subject that goes along with this message:

> This **very** simple Delphi 6 program using a TCheckListBox control gives a
> "list index out of bounds (-1)" error when I execute it under Windows NT 4.0
> Workstation.  It does not give an error on my Windows XP Home workstation.

Neither on Win2K Sp2.

--
Peter Below (TeamB)  
Use the newsgroup archives :
http://www.mers.com/searchsite.html
http://www.tamaracka.com/search.htm
http://groups.google.com
http://www.prolix.be

Re:TCheckListBox and List Index Out of Bounds Error on NT 4.0


  If you delete all the lines in the TCheckListBox, and only have
1 line. (ie: make sure that it is showing the "1")
and it will run on WinNT 4.0 Server. But once you put in more than that
1 line, that is what gives you the listindex out of bounds.

"Are we sure that this component will work properly on NT 4.0???"
Just asking, as I have never used it before.

Wayne

Quote
"Vinnie Murdico" <vin...@softwarewithbrains.com> wrote in message

news:3cbf9212_2@dnews...
Quote
> Hi all,

> I have posted a *small* attachment in the borland.public.attachments NG
> under the same subject that goes along with this message:

> This **very** simple Delphi 6 program using a TCheckListBox control gives
a
> "list index out of bounds (-1)" error when I execute it under Windows NT
4.0
> Workstation.  It does not give an error on my Windows XP Home workstation.
> All the program does is change the text of the existing items in the list
> box.  I have installed IE5.5 on the Windows NT workstation thinking it
might
> be an older version of the common controls, but the error still occurs.

> I'd be grateful if someone using NT 4 and D6 could build and run this
> project and let me know if they get the error as well.

> Does anyone see anything funky about the code that would cause this to
> happen?

> Thanks,
> Vinnie Murdico

Re:TCheckListBox and List Index Out of Bounds Error on NT 4.0


Quote
> Neither on Win2K Sp2.

But you DO get an error on NT 4?

Thanks,
  Vinnie Murdico.

Re:TCheckListBox and List Index Out of Bounds Error on NT 4.0


Yes, I've noticed some other things, too, like if you create a TStringList
with the options in it, then clear the list box at runtime and assign the
list box list to the TStringList, it runs ok (at least I think that's what I
did <g>).  There seems to be something about changing the existing text...
well, or some other bug and that's just one of many incarnations.

In one case (while playing with one potential solution), I was also able to
make it generate the error while checking/unchecking the boxes.  Note: there
was no program code (read: *my* program code) for the checking/unchecking
event -- just filling the box at startup with no other event logic in the
app.  Something was happening at the VCL level.

I did notice that if I set Multiselect := True before changing any of the
text that this also made it work.  Any ideas why?

Thanks for testing it, everyone -- I feel a bit better now.

-- Vinnie

Re:TCheckListBox and List Index Out of Bounds Error on NT 4.0


Quote
In article <3cc01e53_2@dnews>, Vinnie Murdico wrote:
> But you DO get an error on NT 4?

No NT 4 around anymore, sorry.

--
Peter Below (TeamB)  
Use the newsgroup archives :
http://www.mers.com/searchsite.html
http://www.tamaracka.com/search.htm
http://groups.google.com
http://www.prolix.be

Re:TCheckListBox and List Index Out of Bounds Error on NT 4.0


I have a NT Workstation and Delphi 6 available, im pleasured to help you
running your code and debug it if necessary.

Regards,

German Casais
gcas...@dpsautomation.com

"Vinnie Murdico" <vin...@softwarewithbrains.com> escribi en el mensaje
news:3cbf9212_2@dnews...

Quote
> Hi all,

> I have posted a *small* attachment in the borland.public.attachments NG
> under the same subject that goes along with this message:

> This **very** simple Delphi 6 program using a TCheckListBox control gives
a
> "list index out of bounds (-1)" error when I execute it under Windows NT
4.0
> Workstation.  It does not give an error on my Windows XP Home workstation.
> All the program does is change the text of the existing items in the list
> box.  I have installed IE5.5 on the Windows NT workstation thinking it
might
> be an older version of the common controls, but the error still occurs.

> I'd be grateful if someone using NT 4 and D6 could build and run this
> project and let me know if they get the error as well.

> Does anyone see anything funky about the code that would cause this to
> happen?

> Thanks,
> Vinnie Murdico

Re:TCheckListBox and List Index Out of Bounds Error on NT 4.0


Thanks!

If you could run D6 with the Debug DCU's, it would be interesting to trace
it -- assuming you get the error as well when you run it normally.  My NT 4
does not have D6 installed on it and I haven't had a chance to install it
yet.

-- Vinnie

Other Threads