HTMLViewer Title changed event

I wrote my on help system (based on the now defunct UniHelp). Worked fine but I kept getting errors after upgrading to Xojo 2020V1. It seems the HTML title viewer TitleChanged event is no longer passing the page title in the newTitle parameter.

From the parent app I can request a help page. Works fine. On the help view window I have controls to step up or down the table of contents. That seems to work as well, it’s when I go back to the parent app and request help again it fails. So far as I can make out its the navigating up and down the TOC that is causing the problem.

The live version of the app was compiled with Xojo 2019R2 and it works properly. However if I compile the source for that version it also fails.
Anyone got any ideas? This is a Mac app.


Do you mean the event doesn’t fire or that it does, but that the NewTitle parameter is empty?

Bear in mind the note here:

Oh - and also note that the title has to actually change. Setting it, if it doesn’t change, won’t cause an event.

The event fires but newTitle is empty.

If you’re just using this to pass data back, in 2020r1 you could instead use:

I’m using the event to get the HTML page that has been displayed and using that to update the position in the table of contents.
If I directly request a page, the event is telling me what has been displayed but If I request the next or previous page it’s not. This function works off the TOC. When next or previous is requested I find the current page in an internal class and then identify the next / previous. This is internal to the help class itself.
I’ve overloaded the help class with error checking. When the TitleChanged event runs I pick up the newTitle and try and identify that in my TOC class, if it can’t find it, which should never happen, I return and error code to the parent application. This error code is what is causing me the problem because when I use the next / previous on the help browser window newTitle is empty. Nothing generally resets that error code so the next time I request help from the application the error code is set and it returns to the caller.
Strangely next / previous at least visually seems to work so I’ve got round the problem by resetting the error code when requesting help from the application and everything seems to work. But I’ve a constant nagging feeling you can’t sort problems by ignoring or just working round them.
As I said earlier the current live version of the program works properly but if I recompile the source for that it fails, so something underlying has changed.