Page 1 of 1

Error creating form: Ancestor for TfrmRVBase not found

Posted: Fri Nov 25, 2011 7:22 pm
by jfleming
When I compile my program I get the following error message:

Error creating form: Ancestor for TfrmRVBase not found.

in module RichViewActions

What is causing this ???

What is the solution ???

JF

Posted: Fri Nov 25, 2011 8:01 pm
by Sergey Tkachenko
This error happens not on a compilation, but when Delphi tries to open one of RichViewActions forms. Just close it without saving and proceed to compile.

Posted: Fri Nov 25, 2011 9:53 pm
by jfleming
Yes, Sergey, you are right. It is happening because there are two warnings in module PageSetupRVForm, at lines 284 and 288:
E1048: Unsafe typecast of 'TObject' to 'Integer'

Code is as follows:
283 if GetXBoxItemIndex(_cmbSize)>=0 then begin
284 DevMode.dmPaperSize := Integer(GetXBoxObject(_cmbSize, GetXBoxItemIndex(_cmbSize)));
285 DevMode.dmFields := DevMode.dmFields or DM_PAPERSIZE;
286 end;
287 if GetXBoxItemIndex(_cmbSource)>=0 then begin
288 DevMode.dmDefaultSource := Integer(GetXBoxObject(_cmbSource, GetXBoxItemIndex(_cmbSource)));
289 DevMode.dmFields := DevMode.dmFields or DM_DEFAULTSOURCE;
290 end;

Posted: Sat Nov 26, 2011 11:45 am
by Sergey Tkachenko
(this code is correct, even in 64-bit projects).

These warnings will be removed in the next update (by including {$I RV_Defs.inc} in this unit)