I’m working on some cross-platform application development in Xojo. I was pumping out some data to HTML for reporting purposes, and using the host machine to display that HTML. It was working like a charm on Linux, however I wasn’t getting the HTML to display on the Mac. Well, I wasn’t reading far enough down the documentation. Here’s what you need to do on the Mac. This works on Linux as well so one solution works for both.
' ... I'm assuming that you've created your HTML file already ...
DIM oMyDir AS FolderItem = SpecialFolder.ApplicationData.Child("MyApp")
DIM oMyHTMLFile AS FolderItem = oMyDir.Child("MyHtmlFile.html")
ShowURL( oMyHTMLFile.URLPath ) '<-- Shows HTML file in the comp's browser
I was trying all of the other path types and it worked on Linux, but not on Mac: AbsolutePath, ShellPath, NativePath. All of these don't work. Use the URLPath.