Error loading file with another extension

General TRichView support forum. Please post your questions here
Post Reply
starhu
Posts: 49
Joined: Fri Jan 17, 2014 6:33 pm

Error loading file with another extension

Post by starhu »

Hello,

My customer requires to use another extension. I set everything in RVAControlPanel.

When I open such a file e.g. something.brd then I get this error:


Error loading file
Possible reasons:
‐ format of this file is not supported by this application;
‐ the file is corrupted;
‐ the file is opened and locked by another application.

If I rename to .rvf, it can open again.

Thank you
Sergey Tkachenko
Site Admin
Posts: 17557
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post by Sergey Tkachenko »

Please give me step-by-step instructions how to reproduce this problem.

I copied readme.rvf as readme.brd, and made the following changes in the ActionTestUni project's RVAControlPanel1:
DefaultExt='brd'
DefaultFileName='Untitled.brd'
RVFFilter='RichView Files (*.brd)|*.brd'
RVFLocalizable=False

Everything works as expected, I can open readme.brd
starhu
Posts: 49
Joined: Fri Jan 17, 2014 6:33 pm

Post by starhu »

Hello,

I don't know what I missed out but I copied your setting in my code:

with RVAControlPanel1 Do
Begin
DefaultExt:='brd' ;
DefaultFileName:='Untitled.brd';
RVFFilter:='Brandocs állományok (*.brd)|*.brd' ;
RVFLocalizable:=False;
End;

And now it seems to work! Thank you very much for your help!
starhu
Posts: 49
Joined: Fri Jan 17, 2014 6:33 pm

Post by starhu »

I found out what causes the problem:

If I use :

srvActionsResource.rvActionOpen1.CustomFilter := 'brd docs|*.bds';

then I can open the "bds" extensions well.

But if I use this:

srvActionsResource.rvActionOpen1.CustomFilter := 'brd docs|*.bds';
srvActionsResource.rvActionOpen1.Filter := [ffiCustom]; // so as only bds extension would be available

I get an error message...

Thank you
Sergey Tkachenko
Site Admin
Posts: 17557
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post by Sergey Tkachenko »

If you use CustomFilter property instead of renaming RVF format, you need to process this file of types yourself, in RVAControlPanel.OnCustomFileOperation event: http://www.trichview.com/help-actions/t ... ration.htm
starhu
Posts: 49
Joined: Fri Jan 17, 2014 6:33 pm

Post by starhu »

Hello,

"If you use CustomFilter property instead of renaming RVF format, you need to process this file of types yourself"

Is there an easier way to rename the Rvf format?

Thank you
Sergey Tkachenko
Site Admin
Posts: 17557
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post by Sergey Tkachenko »

Assigning
with RVAControlPanel1 Do
Begin
DefaultExt:='brd' ;
DefaultFileName:='Untitled.brd';
RVFFilter:='Brandocs állományok (*.brd)|*.brd' ;
RVFLocalizable:=False;
End;

is the simplest way
starhu
Posts: 49
Joined: Fri Jan 17, 2014 6:33 pm

Post by starhu »

Thank you very much!
Post Reply