Page 1 of 1

Error loading file with another extension

Posted: Fri Feb 14, 2014 9:27 am
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

Posted: Fri Feb 14, 2014 9:41 am
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

Posted: Fri Feb 14, 2014 10:55 am
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!

Posted: Tue Feb 18, 2014 5:52 pm
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

Posted: Wed Feb 19, 2014 8:46 am
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

Posted: Wed Feb 19, 2014 2:35 pm
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

Posted: Wed Feb 19, 2014 3:20 pm
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

Posted: Wed Feb 19, 2014 3:34 pm
by starhu
Thank you very much!