Maybe this is why charts for desktop dont use ChartJS?

dead simple project
window with an htmlviewer
the html viewer loads content saved in a constant

you can copy & paste the content in to something like BBEdit and preview it in Safari just fine

in Xojo project - nada

anyone ?

cant attach the project so here’s a link to the zip file

Even FileMaker can do that.

Adding almost 100 Mb in cromium just for some charts. not worth in most cases…

Sorry, I don’t get the point. Reload does not work for me, but rest looks ok. What’s not working?

it didnt work at all here on Catalina
I just get a blank HTMLViewer

I see, thanks. So the good news is the code is working with Ventura 13.3.

UGH :frowning:

That HTML code works fine in Safari on Catalina - not in html viewer though
Why not ?
No idea
I am using a recent version of Xojo so it should be linked against the same webkit api’s

EDIT : opened project in 2023r1.1 :stuck_out_tongue:
converted it to API 2
still get a blank htmlviewer

IF it depends on the version of the underlying webkit then I can see why 13.3 works and Catalina (10.15.7) doesnt
Safari reports Version 15.6.1 (15613., 15613)
Not sure where or if Safari of any of the developer modes tells me what version of webkit this is

EDIT 2 : wikipedia has a map from Safari version to web kit version
looks like mine is 613.2.7

So that possibly handles the one possible issue I could imagine – having no ad hoc code signature and so no permission to address external URLs.
Did you try to load the js code internally, not from the url?

I didnt

wanted a really simple example and thats more work than I wanted to invest :stuck_out_tongue:

the example simple worked for you without any such gyrations ?
that it did/does there and not here seems peculiar & really its just a curiousity more than anything
IF xojo used chartJS on desktop then desktop charts would be “the same” as web since they use the same library instead of the differences they have today

oh well

many years ago I’ve made a Report Generator in HTML and viewed it internally within Xojo (Webkit on Mac/Linux, IE on Windows (later Chromium). As soon as you have any CSS or JS dependencies for your HTML I usally ran into troubles of security sandboxes on different platforms. On Windows I needed to tweak Registry Settings not to get old IE Engines, on Chromium no Javascripts were allowed and WebKit had some other issues, I can’t remember anymore.

What I do remember and what still is open as Issue: In Xojo integrated Webkit-Browser can only print the first page. This brings your idea to an sudden death when you paint wonderful charts on screen without the chance to export them as multi-page PDF or printout.

Yes. Downloaded it, opened it, ran it as debug build …

One last idea: Did you use Console to watch for possible warnings when your app runs?

No I didnt

let me rephrase this


I just cant be bothered

EDIT : I might give it a shot in a macOS C# app though just for fun :slight_smile:

EDIT II : 5 lines of code and a IDE update later same result as Xojo
Odd since Safari has no issue showing it
Spent more time on this than I meant to

1 Like