HTMLViewer and/or SpecialFolder.Temporary stop working 2019R2?

Hi all,

today I upgraded to 2019R2 and my previous applications HTMLViewer have all stopped working. With just simple code:

dim theHTML as string = theOrder.ReturnOrderItems_HTMLView(currentOrderIDinBatch,ShowOnlyFilter)

detailsView.LoadPage(theHTML,SpecialFolder.Temporary)

where detailsView is an HTMLViewer and theHTML string is just some html to display.

The HTMLViewer now has an error (“Navigation to the webpage was canceled”) and no temp file is generated in my Temp directory. If you right click on the HTMLViewer and go to Properties, it has a file url to my Temp directory to a temp file that does not exist. It’s almost like Xojo cannot write to SpecialFolder.Temporary anymore.

I have included a screenshot of the application in operation, along with the htmlviewer showing the error, and the right click-properties showing the Address to a file that doesn’t exist in the Temp directory.

Please note that this worked perfectly in 2019R1.1 and for many years before. I read the 2019R2 release notes and I don’t see anything about HTMLViewer’s functionality changing.

Here is the same thing working in 2019R1.1 a few minutes later.

Looks like a bug, pop a feedback ticket in with a little sample project.

Try

detailsView.LoadPage(theHTML,Nil)

But I think your mistake was to point to a folder, and not a file.

See http://documentation.xojo.com/api/deprecated/htmlviewer.html#htmlviewer-loadpage

The example:

Var f As FolderItem = FolderItem.TemporaryFile HTMLViewer1.LoadPage(TextArea1.Value, f)

[quote=461524:@Michel Bujardet]Try

detailsView.LoadPage(theHTML,Nil)

But I think your mistake was to point to a folder, and not a file.

See http://documentation.xojo.com/api/deprecated/htmlviewer.html#htmlviewer-loadpage

The example:

Var f As FolderItem = FolderItem.TemporaryFile HTMLViewer1.LoadPage(TextArea1.Value, f)[/quote]

Hi Michel!

Thank you for your suggestions.

I tried the nil load with the same results:

[code]dim theHTML as string = theOrder.ReturnOrderItems_HTMLView(currentOrderIDinBatch,ShowOnlyFilter)

detailsView.LoadPage(theHTML,nil)[/code]

So then I tried pointing to a temporary file with, unfortunately, similar results:

[code]dim theHTML as string = theOrder.ReturnOrderItems_HTMLView(currentOrderIDinBatch,ShowOnlyFilter)

Var f As FolderItem = FolderItem.TemporaryFile

detailsView.LoadPage(theHTML,f)[/code]

Note that the act of pointing to a file DOES create a temporary file, but it is ZERO bytes! It is a totally empty file.

Either I am completely misunderstanding a change made in 2019R2 in how htmlviewers operate, or it is, as Julian suggested, a bug. Unless does anyone have another suggestion? I’d really like to transition my project to 2019R2 but obviously cannot at this point.

(While the documentation purports that one must point to a file, pointing to the temporary folder worked in all previous versions; I know that is not a guarantee of it continuing to work, but there was no documentation in 2019R2 that indicated htmlviewer has been changed or ‘fixed’)

I have submitted a case , 58142.

Verified <https://xojo.com/issue/58142>