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

Cannot cast gio.Filer properly #29

Closed
diamondburned opened this issue Aug 20, 2021 · 1 comment
Closed

Cannot cast gio.Filer properly #29

diamondburned opened this issue Aug 20, 2021 · 1 comment

Comments

@diamondburned
Copy link
Owner

Functions like (*gtk.FileChooser).File() gio.Filer cannot be casted properly.
It seems like the instance type is not found in the registry, so that should be
investigated upon.

panic: interface conversion: *glib.Object is not gio.Filer: missing method AppendTo [recovered]
	panic: closure error: unexpected panic caught: interface conversion: *glib.Object is not gio.Filer: missing method AppendTo

Closure added at:
	github.com/diamondburned/gotktrix/internal/app/messageview/compose.uploader at /home/diamond/Scripts/gotk4/gotktrix/internal/app/messageview/compose/composer.go:83
	github.com/diamondburned/gotktrix/internal/app/messageview/compose.New.func1 at /home/diamond/Scripts/gotk4/gotktrix/internal/app/messageview/compose/composer.go:53
	github.com/diamondburned/gotk4/pkg/core/glib.goMarshal at /home/diamond/.go/pkg/mod/github.com/diamondburned/gotk4/pkg@v0.0.0-20210820075903-8cbc5d9033e7/core/glib/glib.go:162

goroutine 1 [running]:
github.com/diamondburned/gotk4/pkg/core/closure.(*FuncStack).Panicf(0xc000210ab0, {0x1bae5e4, 0x1b}, {0xc0073d1038, 0x1, 0x1})
	/home/diamond/.go/pkg/mod/github.com/diamondburned/gotk4/pkg@v0.0.0-20210820075903-8cbc5d9033e7/core/closure/funcstack.go:93 +0x8fe
github.com/diamondburned/gotk4/pkg/core/closure.(*FuncStack).TryRepanic(0x0)
	/home/diamond/.go/pkg/mod/github.com/diamondburned/gotk4/pkg@v0.0.0-20210820075903-8cbc5d9033e7/core/closure/funcstack.go:111 +0xc7
panic({0x1975160, 0xc00861c0f0})
	/nix/store/qyakjxlzyzvgns61gm9d7qgyq05jmzgp-go-1.17/share/go/src/runtime/panic.go:1038 +0x215
github.com/diamondburned/gotk4/pkg/gtk/v4.(*FileChooser).File(0xc006742368)
	/home/diamond/.go/pkg/mod/github.com/diamondburned/gotk4/pkg@v0.0.0-20210820075903-8cbc5d9033e7/gtk/v4/gtkfilechooser.go:451 +0xa7
@diamondburned
Copy link
Owner Author

Fixed in 5622f54.

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

1 participant