Page 1 of 1

Solving problem List Insex Out of bound

Posted: Thu Jan 31, 2008 8:34 pm
by liabach
Sorry for my english

Until debugging source code we found next :

In unit SclRView in procedure TSRichViewEdit.DrawComponents
was written:
for ItemNo := StartItemNo to EndItemNo do
case RVData.GetItemStyle(ItemNo) of
rvsComponent :
begin
..........

This cause errors in such cases:
1. Paste text from Clipboard and then Undo
2. In some cases type BackSpace
3. And using function InsertText

In my opinion the problem is that qty. items in RVData does not equal EndItemNo
This is my solving:

begin
RVData.UpdateItemsPaletteInfo; // update RVData items
for ItemNo := StartItemNo to RVData.ItemCount - 1 do
// for ItemNo := StartItemNo to EndItemNo do
case RVData.GetItemStyle(ItemNo) of
rvsComponent :
begin
......

In our project it works. But if we have made mistake tell us.
Thanks

Posted: Sun Feb 03, 2008 5:38 pm
by proxy3d
In this code there is no mistake. At formatting the document, the call repaint is a mistake. The new release is now ready, is fast we it we shall lay out.