Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

missing marshaler for type #29

Open
biter777 opened this issue Jul 25, 2019 · 2 comments
Open

missing marshaler for type #29

biter777 opened this issue Jul 25, 2019 · 2 comments

Comments

@biter777
Copy link

I try to use a exapmle:

	gtk.Init(nil)
	go func() {
		runtime.LockOSThread()
		gtk.Main()
	}()

	ctx := webloop.New()
	view := ctx.NewView()
	defer view.Close()
	view.Open("http://google.com")
	err := view.Wait()      // error in runtime
	if err != nil {
		fmt.Fprintf(os.Stderr, "Failed to load URL: %s", err)
		os.Exit(1)
	}
	res, err := view.EvaluateJavaScript("document.title")
	if err != nil {
		fmt.Fprintf(os.Stderr, "Failed to run JavaScript: %s", err)
		os.Exit(1)
	}
	fmt.Printf("JavaScript returned: %q\n", res)

It compiles, but gives an error in runtime:
"warning: no suitable Go value from object for arg 0: missing marshaler for type"

go1.12.7 linux/amd64
Ubuntu 18.04.2 LTS

How to fix it?
Thnx

@maitredede
Copy link

Hi,
I have the same behavior.
It is related to library https://github.com/gotk3/gotk3 that does not know how to translate a type into a Go struct. There are marshallers for many widgets, but the missing one in our case is related to library https://github.com/sourcegraph/go-webkit2 that did not register marshallers for its types.
I extended gotk3 to have the missing type name...

@sdobz
Copy link

sdobz commented Feb 13, 2020

@maitredede could you share your fork? I'm running into the same issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants