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

getproperty() for GBoxed type properties is broken #65

Closed
jwahlstrand opened this issue May 12, 2024 · 0 comments · Fixed by #67
Closed

getproperty() for GBoxed type properties is broken #65

jwahlstrand opened this issue May 12, 2024 · 0 comments · Fixed by #67
Labels
bug Something isn't working

Comments

@jwahlstrand
Copy link
Member

using Gtk4

c = GtkColorButton()
c.rgba

produces:

ERROR: MethodError: no constructors have been defined for Gtk4.GLib.GBoxed
Stacktrace:
 [1] convert(::Type{Gtk4.GLib.GBoxed}, unbox::Ptr{Gtk4.GLib.GBoxed}, owns::Bool)
   @ Gtk4.GLib ~/Sync/Gtk4.jl/src/GLib/gtype.jl:119
 [2] convert(::Type{Gtk4.GLib.GBoxed}, unbox::Ptr{Gtk4.GLib.GBoxed})
   @ Gtk4.GLib ~/Sync/Gtk4.jl/src/GLib/gtype.jl:119
 [3] (::Gtk4.GLib.var"#70#71")(v::Base.RefValue{Gtk4.GLib.GValue})
   @ Gtk4.GLib ~/Sync/Gtk4.jl/src/GLib/gvalues.jl:186
 [4] getindex(gv::Base.RefValue{Gtk4.GLib.GValue}, ::Type{Any})
   @ Gtk4.GLib ~/Sync/Gtk4.jl/src/GLib/gvalues.jl:247
 [5] get_gtk_property(w::GtkColorButtonLeaf, name::String)
   @ Gtk4.GLib ~/Sync/Gtk4.jl/src/GLib/gvalues.jl:289
 [6] get_gtk_property
   @ ~/Sync/Gtk4.jl/src/GLib/gvalues.jl:284 [inlined]
 [7] getproperty(w::GtkColorButtonLeaf, name::Symbol)
   @ Gtk4.GLib ~/Sync/Gtk4.jl/src/GLib/gvalues.jl:353
 [8] top-level scope
   @ REPL[3]:1

As a workaround, use the accessor method:

Gtk4.rgba(c)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant