EListError On TRichViewEdit.Format
Posted: Wed Jan 17, 2007 5:58 pm
This one's driving me nuts!
I create a document consisting of a table loaded with various entries (some of which are Unicode). I save the table to a file then call
FMain.RichViewEdit1.Clear;
FMain.RichViewEdit1.LoadRVF(StrPas(FLSFile));
FMain.RichViewEdit1.Format;
the code fails on the Format with EListError on this line with List Index Out Of Bounds (0)
FormatLine(
RV_ReturnProcessedString(Items,
RVStyle.TextStyles[GetActualStyleNo(RVStyle)], False,
rvoShowSpecialCharacters in Options, False),
Items, 0,
{$IFNDEF RVDONOTUSEUNICODE}
RVU_Length(Items, ItemOptions),
{$ELSE}
Length(Items),
{$ENDIF}
i, Canvas, sad, Params)
BUT - if I close the program and reopen it and then open the saved file (using the same code as above) it operates perfectly??
Any suggestions?
Dick
I create a document consisting of a table loaded with various entries (some of which are Unicode). I save the table to a file then call
FMain.RichViewEdit1.Clear;
FMain.RichViewEdit1.LoadRVF(StrPas(FLSFile));
FMain.RichViewEdit1.Format;
the code fails on the Format with EListError on this line with List Index Out Of Bounds (0)
FormatLine(
RV_ReturnProcessedString(Items,
RVStyle.TextStyles[GetActualStyleNo(RVStyle)], False,
rvoShowSpecialCharacters in Options, False),
Items, 0,
{$IFNDEF RVDONOTUSEUNICODE}
RVU_Length(Items, ItemOptions),
{$ELSE}
Length(Items),
{$ENDIF}
i, Canvas, sad, Params)
BUT - if I close the program and reopen it and then open the saved file (using the same code as above) it operates perfectly??
Any suggestions?
Dick