Error creating form: Ancestor for TfrmRVBase not found

General TRichView support forum. Please post your questions here
Post Reply
jfleming
Posts: 19
Joined: Tue May 25, 2010 4:58 pm

Error creating form: Ancestor for TfrmRVBase not found

Post 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
Sergey Tkachenko
Site Admin
Posts: 17572
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post 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.
jfleming
Posts: 19
Joined: Tue May 25, 2010 4:58 pm

Post 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;
Sergey Tkachenko
Site Admin
Posts: 17572
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post 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)
Post Reply