naqvis / webview

Crystal bindings to Webview library
MIT License
93 stars 8 forks source link

The example using an URL does not seem to work (displays a blank page instead if the correct web page) #19

Closed serge-hulne closed 1 year ago

serge-hulne commented 1 year ago

I used the example "as is".

The example :

require "webview"

wv = Webview.window(640, 480, Webview::SizeHints::NONE, "Hello WebView", "http://crystal-lang.org")
wv.run
wv.destroy

My data:

Crystal 1.6.0 (2022-10-06)

LLVM: 14.0.6
Default target: aarch64-apple-darwin22.1.0

Chip: M1
OS: Mac OS Ventura 13.0.1

The shards install output:

sergehulne@Serges-Mac-mini browser % shards install                
Resolving dependencies
Fetching https://github.com/naqvis/webview.git
Using webview (0.2.0)

The app:

Capture d’écran 2022-12-18 à 15 31 29
naqvis commented 1 year ago

Thanks @serge-hulne for raising this issue. Overloaded method window was added in last commit and I found that Crystal is behaving weirdly with order or overload definitions and I'll raise an issue on this. But I've re-ordered the overloads and things should work now.

Just make sure you run shards update to ensure you have downloaded the latest commit.