Hello,
I need to use the ActionTest demo project as a base for the application (with multi tabbed documents).
I wanted to load an existing document. I used the following approaches but all gave the error: "List index out of bounds -1"
Approach 1.
ActiveEditor.RichViewEdit.LoadRVF('j:\Test1.rvf') ;
Approach 2.
ActiveEditor.ActiveEditor.LoadRVF('j:\Test1.rvf') ;
By the way it is very confusing that TSrRichView edit has a property named ActiveEditor and the ActionTest demo project has a variable named ActiveEditor .
Approach 3.
SRichViewEdit.ActiveEditor.LoadRVF.LoadRVF('j:\Test1.rvf') ;
Can you help me? Thank you in advance
ActionTest demo->load document -> List index out of b
-
- Site Admin
- Posts: 17565
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
1.
The correct way:
I believe an exception happens because you do not call format.
2.
If you want using New, Open, Save and SaveAs actions, you must load files using TrvActionOpen1.LoadFile method:
Otherwise the editor would not be associated with this file.
The correct way:
Code: Select all
ActiveEditor.RichViewEdit.LoadRVF('j:\Test1.rvf') ;
ActiveEditor.Format;
2.
If you want using New, Open, Save and SaveAs actions, you must load files using TrvActionOpen1.LoadFile method:
Code: Select all
rvActionOpen1.LoadFile(ActiveEditor.RichViewEdit, 'j:\Test1.rvf', ffiRVF);
Hello,
Thank you for your help. I tried it. It loads the file but it has a big problem:
1. I load the first file, let's say 'Apple.rvf'. It loads well.
2.I load the second file, 'Pear.rvf'. It loads on the second tab, but meanwhile the first tab changes from Apple.rvf to Pear.rvf !
So I have 2 tabs with Pear.rvf.
3.I load the third file, 'Cherry.rvf'. It loads on the third tab, but meanwhile the first tab and the second tab changes to Cherry.rvf.
So I have 3 tabs with Cherry.rvf.
etc.
Thank you very much
Thank you for your help. I tried it. It loads the file but it has a big problem:
1. I load the first file, let's say 'Apple.rvf'. It loads well.
2.I load the second file, 'Pear.rvf'. It loads on the second tab, but meanwhile the first tab changes from Apple.rvf to Pear.rvf !
So I have 2 tabs with Pear.rvf.
3.I load the third file, 'Cherry.rvf'. It loads on the third tab, but meanwhile the first tab and the second tab changes to Cherry.rvf.
So I have 3 tabs with Cherry.rvf.
etc.
Thank you very much
-
- Site Admin
- Posts: 17565
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
RichViewActions do not include code for tab management.
In our demos (such as ActionTestTab) all the code related to adding, renaming and closing tabs is placed in the main form unit.
I believe you used it as a base, but some mistake happened when you copied this code to your application.
If it's possible to reproduce it in a simple project, send it to me by email.
In our demos (such as ActionTestTab) all the code related to adding, renaming and closing tabs is placed in the main form unit.
I believe you used it as a base, but some mistake happened when you copied this code to your application.
If it's possible to reproduce it in a simple project, send it to me by email.