List index out of bounds when in table
List index out of bounds when in table
When cursor cet in the table and "nonprinted characters" button pressed (RVActions) "List Index out of bounds (18)" appears with infinite loop.
So only Ctrl+Alt+Del helps
So only Ctrl+Alt+Del helps
-
- Site Admin
- Posts: 17604
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
-
- Site Admin
- Posts: 17604
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
The problem still remains.
Delphi 7 SP1, TRichView 1.9.24, TRichViewActions 1.51.1
Clear TRichViewEdit. Inserting empty table for example 3x3.
Set cursor to the center cell, pressed Toolbak2k button with assigned rvActionShowSpecialCharacters.
Got EListError: List index out of bounds (0), every time. Zero value can be different...depends of table...or text in table.
Delphi 7 SP1, TRichView 1.9.24, TRichViewActions 1.51.1
Clear TRichViewEdit. Inserting empty table for example 3x3.
Set cursor to the center cell, pressed Toolbak2k button with assigned rvActionShowSpecialCharacters.
Got EListError: List index out of bounds (0), every time. Zero value can be different...depends of table...or text in table.
-
- Site Admin
- Posts: 17604
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
Seems it happens only with some non-default options. I'm not sure.
Here is my options for TRichViewEdit hope this helps:
Here is my options for TRichViewEdit hope this helps:
Code: Select all
object RichViewEdit1: TRichViewEdit
Left = 0
Top = 23
Width = 348
Height = 202
AcceptDragDropFormats = [rvddRVF, rvddRTF, rvddText, rvddUnicodeText, rvddBitmap, rvddMetafile, rvddURL, rvddFiles]
ReadOnly = False
OnCaretMove = RichViewEdit1CaretMove
OnCurParaStyleChanged = RichViewEdit1CurParaStyleChanged
OnCurTextStyleChanged = RichViewEdit1CurTextStyleChanged
OnParaStyleConversion = RichViewEdit1ParaStyleConversion
OnPaste = RichViewEdit1Paste
OnStyleConversion = RichViewEdit1StyleConversion
Align = alClient
PopupMenu = TBXPopupMenu1
TabOrder = 0
Visible = False
OnKeyDown = RichViewEdit1KeyDown
OnKeyPress = RichViewEdit1KeyPress
DoInPaletteMode = rvpaCreateCopies
Options = [rvoAllowSelection, rvoScrollToEnd, rvoTagsArePChars, rvoAutoCopyText, rvoAutoCopyRVF, rvoAutoCopyImage, rvoAutoCopyRTF, rvoFormatInvalidate, rvoDblClickSelectsWord, rvoRClickDeselects]
RTFReadProperties.TextStyleMode = rvrsAddIfNeeded
RTFReadProperties.ParaStyleMode = rvrsAddIfNeeded
RTFReadProperties.UseHypertextStyles = True
RVFOptions = [rvfoSavePicturesBody, rvfoSaveControlsBody, rvfoIgnoreUnknownPicFmt, rvfoIgnoreUnknownCtrls, rvfoSaveBinary, rvfoSaveBack, rvfoLoadBack, rvfoSaveTextStyles, rvfoSaveParaStyles, rvfoSaveLayout, rvfoLoadLayout, rvfoSaveDocProperties, rvfoLoadDocProperties]
Style = RVStyle1
OnJump = RichViewEdit1Jump
OnReadHyperlink = RichViewEdit1ReadHyperlink
OnWriteHyperlink = RichViewEdit1WriteHyperlink
end
-
- Site Admin
- Posts: 17604
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
-
- Site Admin
- Posts: 17604
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
I found the place of this problem. It appears here (only when cursor set inside table) in GetLineNo function:
Code: Select all
procedure TMainForm.RichViewEdit1CaretMove(Sender: TObject);
var line,linescount,col:Integer;
begin
RichViewEdit1.GetCurrentLineCol(line,col);
With RichViewEdit1 do
linescount:=GetLineNo(ItemCount-1,GetOffsAfterItem(ItemCount-1));
end;
-
- Site Admin
- Posts: 17604
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
-
- Site Admin
- Posts: 17604
- Joined: Sat Aug 27, 2005 10:28 am
- Contact: