Page 1 of 1

Can't get rvHtmlViewImport to compile

Posted: Tue Nov 08, 2011 5:33 pm
by JonRobertson
I recently purchased TRichView and I decided to install HTMLViewer as well. I grabbed HTMLViewer from Google Code, downloading the Trunk version via Delphi XE.

I have HTMLViewer installed and the demos compile and work great.

Before installing rvHtmlViewImport, I've made the changes as documented at the top of the source file. (Note the TBlockLI.ListFont change is not documented in the ReadMe.txt file.)

Still, I get several compile errors. This confuses me because I should be using the most recent version of both components, and I see Sergey has kept rvHtmlViewImport up-to-date.

The first error was TRVHTMLViewImporter.DoImport wanted to use a ThtDocument for the SectionList parameter if GOOGLECODE was defined. Looking at the HTMLViewer source I have (from http://code.google.com/p/thtmlviewer/), TSectionList is still being used. I changed this code to use the non-GOOGLEDOC version, and it compiled (but may not be correct).

The next problem is in TRVHTMLVIewImport.ImportHorzLine, the first line is looking at blockh1.Owner.BorderStyle. I changed this code to use the non-GOOGLEDOC version, and it compiled.

Next, TRVHTMLViewImporter.ImportSection had code to prevent casting sec.FormControls to TFormControlList when GOOGLECODE wasn't defined. I removed that and the code compiles.

The component now compiles and installs. There are six other places where code is conditionally compiled based on GOOGLECODE that I did not change. Simply disabling the GOOGLECODE define results in many more errors. So I need some of the GOOGLECODE $ifdefs but not others.

Did I do something wrong?

Posted: Tue Nov 08, 2011 6:15 pm
by Sergey Tkachenko
You should use new version of THTMLViewer, not frm trunk but from branches\11

Posted: Tue Nov 08, 2011 6:53 pm
by JonRobertson
Sergey Tkachenko wrote:You should use new version of THTMLViewer, not frm trunk but from branches\11
Thanks. I compared the two and noticed some files in trunk have been modified more recently than the same files in 11. Out of habit I grabbed what I thought was the most recent version.