Hi Sergey,
I'm trying to track down a problem I'm having with the following code sequence:
FMain.RichViewEdit1.Clear;
FMain.RichViewEdit1.Format;
FMain.RVStyleQ.TextStyles.Clear;
<some intervening if/then logic here>
FMain.RichViewEdit1.Clear;
FMain.RichViewEdit1.LoadRVF(StrPas(FLSFile));
FMain.RichViewEdit1.Format;
This is the primary sequence via which each file is loaded into the program. Normally, it works just fine. BUT in an operation sequence where the program has just created a new FLS file by overwriting an older one, then closing it, and then attempting to open it, the above sequence fails with a ListIndexOutOfBounds error in FormatLine.
However, if I exit the program after the creation of the file. Then reopen the program and open the new FLS file there is no error. Can you suggest something I may need to do to 'fully initialize' the RVE so that the sequence above will work without closing the program and reopening it? When not running this particulary import sequence, the program can open and close multiple FLS files with no problem.
The current version of the program actually DOES close after this particular import operation, prompting the user to restart and open the new file to get around this issue, but I would like to remove this inconvenience.
Thanks, As Always, For Your Help
TRichview Format Error
-
- Posts: 148
- Joined: Wed Dec 07, 2005 2:02 pm
- Contact:
-
- Site Admin
- Posts: 17559
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
-
- Posts: 148
- Joined: Wed Dec 07, 2005 2:02 pm
- Contact:
Yes, but the above code works fine when the imported information is from a plain-text source or from the windows clipboard. Only when the import source is from a UTF-8 'pseudo-txt' file is this problem encountered.
And then closing the program and reopening it allows the file to be loaded without a problem.
Any further thoughts? I know how hard it is to speculate on something this tenuous. I'll try tracing the error further through your source code to see if I can get some more information.
And then closing the program and reopening it allows the file to be loaded without a problem.
Any further thoughts? I know how hard it is to speculate on something this tenuous. I'll try tracing the error further through your source code to see if I can get some more information.