* * *

Author Topic: Installation problems with FrameViewer09  (Read 396 times)

bobonwhidbey

  • Full Member
  • ***
  • Posts: 227
Installation problems with FrameViewer09
« on: November 13, 2017, 09:09:09 pm »
In the process of upgrading from FPC 1.7 to 1.8.0RC5 I've had to reinstall a few packages that I rely on. All seems to have gone well except that I can't compile or install FrameViewer09.lpk  from HtmlViewer-HtmlViewer-11.8.  In particular, the compiler can't find SetTabStop.

I want a component that can display HTML on a form. Is there a good workaround to using HtmlViewer which I'm having problems installing OR is there a solution to installing this component?
Win10 64-bit
Lazarus 1.8.0RC5
FPC 3.0.4 - 32bit

Mike.Cornflake

  • Hero Member
  • *****
  • Posts: 1178
Re: Installation problems with FrameViewer09
« Reply #1 on: November 13, 2017, 10:02:49 pm »
Using "HtmlViewer-HtmlViewer-11.8" downloaded from https://github.com/BerndGabriel/HtmlViewer, Lazarus SVN58059 and FPC 3.0.0 I didn't even get as far as you.  Admittedly my system is a few months old now.

Personally I'd suggest you work with the code and bring it up to scratch.  BerndGabriel has put a big hint there that he'd welcome changes from others :-)

If you got your "HtmlViewer-HtmlViewer-11.8" from elsewhere, please include this information.  It's a big web out there, though I admit it didn't take me long to find BerndGabriel's version  :-)

There's also a version of this code in Lazarus-CCR.  https://sourceforge.net/p/lazarus-ccr/svn/HEAD/tree/components/thtmlport/   Looks like an older branch (simply going on readme.html being dated 2009), but going on the comments on the last commit it compiles against FPC 3.0   So you could check out the two different projects, run a file diff - see what's changed to make the CCR version compile against FPC 3.0?

Or you could just try the version in Lazarus-CCR, might fit for your needs.

Or, and I should have thought of this first, you can try BerndGabriel's development version
https://github.com/BerndGabriel/HtmlViewer/tree/master

Going on the Commit's, looks like it is tested under recent Lazarus...  Always fun working with Development versions though, expect a few issues here and there though.

As for HTML viewer?  You say you want a good solution, that's a little vague.  I use TipHTMLPanel which is acceptable for my use (simple HTML help files).   

« Last Edit: November 13, 2017, 10:12:01 pm by Mike.Cornflake »
Lazarus Trunk/FPC Trunk on Linux & Windows [7, 8.1]
  Have you tried searching this forum or the wiki?:   http://wiki.lazarus.freepascal.org/Alternative_Main_Page
  BOOKS! (Free and otherwise): http://wiki.lazarus.freepascal.org/Pascal_and_Lazarus_Books_and_Magazines

wp

  • Hero Member
  • *****
  • Posts: 3894
Re: Installation problems with FrameViewer09
« Reply #2 on: November 13, 2017, 11:00:48 pm »
There's also a version of this code in Lazarus-CCR.  https://sourceforge.net/p/lazarus-ccr/svn/HEAD/tree/components/thtmlport/   Looks like an older branch (simply going on readme.html being dated 2009), but going on the comments on the last commit it compiles against FPC 3.0

No luck, giving up... I tried with Laz trunk / fpc 3.04. Some changes required, but now the demos crash at runtime because "Find" seems to be called for an unsorted list - current FPC requires a sorted list now. I wish the FPC devs were a bit more reluctant in introducing code-breaking changes...
Lazarus trunk / fpc 3.0.4 / all 32-bit on Win-10

Phil

  • Hero Member
  • *****
  • Posts: 2316
Re: Installation problems with FrameViewer09
« Reply #3 on: November 13, 2017, 11:13:17 pm »
There's also a version of this code in Lazarus-CCR.  https://sourceforge.net/p/lazarus-ccr/svn/HEAD/tree/components/thtmlport/   Looks like an older branch (simply going on readme.html being dated 2009), but going on the comments on the last commit it compiles against FPC 3.0

No luck, giving up... I tried with Laz trunk / fpc 3.04. Some changes required, but now the demos crash at runtime because "Find" seems to be called for an unsorted list - current FPC requires a sorted list now. I wish the FPC devs were a bit more reluctant in introducing code-breaking changes...

I did the first port of those components and quickly regretted the time I spent flailing away at what was pretty rough code - I could see why it was placed into the public domain. Maybe Bernd is more committed to his port, but really a better solution is to use an actual Web browser control that embeds a real browser, not just some halfway attempt at rendering HTML. The TWebBrowser control here only supports Cocoa and Qt widgetsets...

https://macpgmr.github.io/

...but Windows support should be possible using the ActiveX control (Shell.Explorer). I don't do desktop software development anymore so adding that doesn't interest me much.

bobonwhidbey

  • Full Member
  • ***
  • Posts: 227
Re: Installation problems with FrameViewer09
« Reply #4 on: November 14, 2017, 07:34:32 pm »
I finally got HTMLViewer to work very nicely with Laz 1.8.0RC5 when I used HtmlViewer-HtmlViewer-11.7, not 11.8. Even worked well with some simple CSS (below). Yes - this is a Windows desktop app but I'm glad it works.

Code: Javascript  [Select]
  1. <style type="text/css">
  2. p               {       MARGIN-TOP: 0;  MARGIN-BOTTOM: 0;  }
  3. body                    { BACKGROUND-COLOR: #F6F6F6;    FONT: "CCWriter" 14pt;  }
  4. p.header        {       TEXT-DECORATION: underline;     FONT-WEIGHT: bold;      COLOR: navy;    FONT-SIZE: 12pt;  }
  5. ul#rslt         { LIST-STYLE-TYPE: none;        MARGIN: 0;      PADDING: 0;     WIDTH: 90; }
  6. ul#rslt .r      { FLOAT: right; MARGIN-RIGHT: 6;        COLOR: #660033; }
  7. ul#rslt .l      { FLOAT: left;  MARGIN-LEFT: 6; }
  8. TD.dca          { COLOR: black; }
  9. TD.dcb          { COLOR: red;   FONT-WEIGHT: bold; }
  10. TD.rnote        { TEXT-ALIGN: center;   }
  11. table.res-table         { BACKGROUND-COLOR: #E0DCC3;   xBORDER: 1px solid red;  }
  12. table.res-table td      { BACKGROUND-COLOR: #E0DCC3;    PADDING: 5px; 20px; 5px; 25px;  FONT-SIZE: 18px;  xBORDER: 1px solid black;     }
  13. table.res-table th      { BACKGROUND-COLOR: #40C040;    PADDING: 5px; 25px; 5px; 25px;  FONT-SIZE: 18px;  TEXT-ALIGN: center;  xBORDER: 1px solid blue;         }
  14. table.res-table th.rsltH                {               PADDING: 5px; 45px; 5px; 45px; }
  15. .NT             { COLOR: #7070FF; letter-spacing: -2.0pt;       FONT-SIZE: 14px;        FONT-WEIGHT: bold;      }
  16. .NTnv           { COLOR: navy;    letter-spacing: -2.0pt;       FONT-SIZE: 14px;        FONT-WEIGHT: bold;      }
  17. .NTbig          { COLOR: green;   letter-spacing: -2.0pt;       FONT-SIZE: 16px;        FONT-WEIGHT: normal;    }
  18. .xNT            { COLOR: navy;    letter-spacing: -1.5pt;       xFONT-VARIANT: small-caps;      }
  19. .NTbob          { vertical-align: sub;  color: navy;  font-size: +1;    }
  20. </style>
« Last Edit: November 14, 2017, 07:36:07 pm by bobonwhidbey »
Win10 64-bit
Lazarus 1.8.0RC5
FPC 3.0.4 - 32bit

Mike.Cornflake

  • Hero Member
  • *****
  • Posts: 1178
Re: Installation problems with FrameViewer09
« Reply #5 on: November 14, 2017, 08:05:05 pm »
G'day,

I'm glad this is working.

For others who follow with this issue, could you please confirm where you downloaded "HtmlViewer-HtmlViewer-11.7" from?   When I went looking there were quite a few different options.

Cheers

Mike
Lazarus Trunk/FPC Trunk on Linux & Windows [7, 8.1]
  Have you tried searching this forum or the wiki?:   http://wiki.lazarus.freepascal.org/Alternative_Main_Page
  BOOKS! (Free and otherwise): http://wiki.lazarus.freepascal.org/Pascal_and_Lazarus_Books_and_Magazines

wp

  • Hero Member
  • *****
  • Posts: 3894
Re: Installation problems with FrameViewer09
« Reply #6 on: November 14, 2017, 08:16:06 pm »
The package which is distributed by the Online-Package-Manager (FrameViewer 11.0) works fine.
Lazarus trunk / fpc 3.0.4 / all 32-bit on Win-10

bobonwhidbey

  • Full Member
  • ***
  • Posts: 227
Re: Installation problems with FrameViewer09
« Reply #7 on: November 14, 2017, 11:48:25 pm »
There's a drop down list. See the attached. I selected 11.7, downloaded and installed that. I may have had to make a minor tweak.
Win10 64-bit
Lazarus 1.8.0RC5
FPC 3.0.4 - 32bit

Mike.Cornflake

  • Hero Member
  • *****
  • Posts: 1178
Lazarus Trunk/FPC Trunk on Linux & Windows [7, 8.1]
  Have you tried searching this forum or the wiki?:   http://wiki.lazarus.freepascal.org/Alternative_Main_Page
  BOOKS! (Free and otherwise): http://wiki.lazarus.freepascal.org/Pascal_and_Lazarus_Books_and_Magazines

 

Recent

Get Lazarus at SourceForge.net. Fast, secure and Free Open Source software downloads Open Hub project report for Lazarus