Open rythmkraze opened 4 years ago
Currently working around it by setting gtk.Frame.SetLabelWidget(nil)
I'm not sure that treating an empty string as a special case is the best approach. It may work for gtk_frame_new
, but perhaps there are other situations were it wouldn't have the desired effect?
Maybe a better approach would be honour the nullable
attribute in the in api, and stay closer to the C function signature.
So the signature would change from
FrameNew(label string) *Frame
to
FrameNew(label *string) *Frame
Maybe a better approach would be honour the nullable attribute in the in api, and stay closer to the C function signature.
I agree. This indeed would be a better approach.
Some Gtk functions take string parameters that can be null, such as the one below.
In the above case we are unable to omit/disable the label widget, as we are unable to pass NULL to the C function.
Gobbi's implementation currently does'nt take into account the nullable string parameters.
The Gotk3 library handles this correctly.
The Gir files do indicate nullable parameters (
nullable="1"
). So code generation should be possible.Would appreciate if you could get this working and a possible workaround if possible until then :)