I want to show some help text that is only a little more complicated that plain text, essentially it just needs headings, tables and plain text. So I thought TIpHtmlPanel should be plenty enough for this. I am then feeding it with handcrafted HTML that carefully avoids any fancy stuff that it cannot display.
For testing the rendering of my HTML during development I wanted the ability to easily reload the file while I am writing the HTML in a text editor: Edit the html, save it, hit reload on my help form to see if it looks correct.
relative to the application there is a folder "help" and inside is "somefile.html"
Initially I load it with
FPanel.OpenURL(FileName) // FileName is 'help/somefile.html'
This works fine. The first time.
Executing the exact same line of code a second time gives the above mentioned error. It will try to interpret the URL as relative to the loaded document but even this won't really work, I have the impression the OpenURL() method is broken anyways. For example it errors out on 'file://' only a few lines above that section of code where it would test the string for 'file://', very strange...
Anyhow, meanwhile I have found through experimentation that calling
FPanel.SetHtmlFromStr('');
before I use OpenURL will reset it into the state where OpenURL will work again.
I got it working now for what I need it, but I already found a rendering bug: It will ignore TextColor for Text inside Tables and render them black, this makes it harder for me to switch theme colors from light to dark, I need to provide two different stylesheets, I was hoping I could avoid this by just changing thet default colors as it seems to be intended to work that way because it partially works already, I will file a bug in the next few days.