Delphi Inspiration

Components and Applications

User Tools

Site Tools


wiki:htmlparser:index

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

wiki:htmlparser:index [2016/01/22 15:08] (current)
Line 1: Line 1:
 +====== DIHtmlParser:​ Wiki ======
  
 +{{page>​products:​htmlparser:​header}}
 +{{page>:​wiki-header}}
 +
 +===== DIHtmlMimeMesage =====
 +
 +{{http://​www.yunqa.de/​delphi/​downloads/​DIHtmlMimeMessage.zip|DIHtmlMimeMessage}} is an add-on to [[products:​htmlparser:​|DIHtmlParser]] to create MIME messages from existing HTML documents and automatically add required attachment files. It is excellent to send existing HTML documents as e-mails. Example projects demonstrate this with Indy, ICS, Synapse, and other Freeware Delphi Internet components.
 +
 +{{http://​www.yunqa.de/​delphi/​downloads/​DIHtmlMimeMessage.zip|DIHtmlMimeMessage}} was last updated on 2009-08-10 to fix a few minor issues related to Delphi 2009. There are no known problems at the time of this writing.
 +
 +===== C++ Builder 6 Solutions =====
 +
 +==== Which folders to use? ====
 +
 +Include the Delphi 6 folders into your C++ Builder 6 search path:
 +
 +  * ''​\DIHtmlParser_Install\D6\''​
 +  * ''​\DIHtmlParser_Install\Source\''​
 +
 +==== IDE Installation ====
 +
 +Open the ''​\DIHtmlParser_Install\Source\DIHtmlParser_C6.bpk''​ package. C++ Builder will pop up an error message that it //"​Cannot find resource file DIHtmlParser_C6.res. Recreated."//​ The file is excluded from DIHtmlParser because it is not important for the library. However, it is normal for C++ Builder to recreate missing package resource files, so just press OK. This will cause package window to show up. Continue to press compile and, finally, install. C++ Builder will notify you that the package has been installed and the new components have been registered.
 +
 +==== Compilation Problems ====
 +
 +C++ Builder 6 compiles DIHtmlParser applications without errors if if has access to the full DIHtmlParser Source Code. The DIHtmlParser Commercial and Demo editions must instead use the *.hpp files which were auto-generated by Delphi 6. Unfortunately,​ Delphi adds a few errors to the conversion. Fortunately,​ they can be easily corrected.
 +
 +When you compile your project, you will likely encounter one or more of these errors:
 +
 +Auto-generated code:
 +
 +<code c++>
 +#include "​DIHtmlParser.h"​
 +#include "​DIUnicode.h"​
 +</​code>​
 +
 +Corrected code:
 +
 +<code c++>
 +#include "​DIHtmlParser.hpp"​
 +#include "​DIUnicode.hpp"​
 +</​code>​
 +
 +----
 +
 +"​E2241:​ VCL style classes need virtual destructors"​ on these lines, at different places:
 +
 +<code c++>
 +__fastcall ~TDIWriter(const unsigned Dummy = (unsigned)(0x0));​
 +
 +/* TDIWriter.DestroyNoFlushBuffer */ inline __fastcall ~TDIBinaryWriter(
 +   const unsigned Dummy = (unsigned)(0x0)) { }
 +</​code>​
 +
 +Correct this by removing the tilde signs (~) in both lines:
 +
 +<code c++>
 +__fastcall TDIWriter(const unsigned Dummy = (unsigned)(0x0));​
 +
 +/* TDIWriter.DestroyNoFlushBuffer */ inline __fastcall TDIBinaryWriter(
 +   const unsigned Dummy = (unsigned)(0x0)) { }
 +</​code>​
 +
 +After fixing the above, some versions of C++ Builder (like XE3) issue the following error in DIHtmlParser.hpp:​
 +
 +  [bcc32 Error] DIHtmlParser.hpp:​ E2238 Multiple declaration for '​_fastcall TDIHtmlParser::​TDIHtmlParser(TComponent *)'
 +
 +The two offending lines are:
 +
 +<code c++>
 +public:
 +__fastcall virtual TDIHtmlParser(System::​Classes::​TComponent* AOwner);
 +__fastcall virtual TDIHtmlParser(System::​Classes::​TComponent* const AOwner)/* overload */;
 +</​code>​
 +
 +Fix: Comment out the first line like this:
 +
 +<code c++>
 +public:
 +/* __fastcall virtual TDIHtmlParser(System::​Classes::​TComponent* AOwner); */
 +__fastcall virtual TDIHtmlParser(System::​Classes::​TComponent* const AOwner)/* overload */;
 +</​code>​
 +
 +----
 +
 +The auto-conversion has dropped the ''​const''​ keyword from some property declarations:​
 +
 +<code c++>
 +__property unsigned LastChildNumber[void * PItem] =
 +  {read=GetLastChildNumber,​ write=SetLastChildNumber};​
 +__property unsigned FirstChildNumber[void * PItem] =
 +  {read=GetFirstChildNumber,​ write=SetFirstChildNumber};​
 +</​code>​
 +
 +Fix this by inserting the missing ''​const''​ like here:
 +
 +<code c++>
 +__property unsigned LastChildNumber[const void * PItem] =
 +  {read=GetLastChildNumber,​ write=SetLastChildNumber};​
 +__property unsigned FirstChildNumber[const void * PItem] =
 +  {read=GetFirstChildNumber,​ write=SetFirstChildNumber};​
 +</​code>​
 +
 +==== E2209 Unable to open include file ====
 +
 +Include files for the **precompiled Pascal units** are located in the ''​\DIHtmlParser_Install\D6\''​ directory. Set up your search path accordingly.
 +
 +For the **Pascal source code units** in ''​\DIHtmlParser_Install\Source\'',​ C++ Builder automatically creates missing include files when it compiles *.pas units. You can force this if you
 +
 +  * Compile the DIHtmlParser package as described above.
 +  * Add the corresponding *.pas file to your project. Then open the Project Manager and move it above the file using it. You can use drag & drop to reorder.
wiki/htmlparser/index.txt · Last modified: 2016/01/22 15:08 (external edit)