Coder Social home page Coder Social logo

Comments (3)

PhilippMDoerner avatar PhilippMDoerner commented on June 2, 2024

Sidenote, I've expanded upon the minimal example a bit.
If you add to widgetutils.nim the following:

  • line 243: echo "Fully new add: ", childWidget.pointer.repr
  • line 254: echo "Remove Finally: ", child.widget.unwrapInternalWidget().pointer.repr

You can see where the individual GTKWidgets get fully added and removed.
Therefore you can see that this is an erroneous error message because you can see the widget getting added to ExpanderRow.

Example logs:

Fully new add: 000055ACA5F99E70
Fully new add: 000055ACA5FF5360
Fully new add: 000055ACA5F57C30 # This is the exact same pointer that later gets removed!!!
Remove Finally: 000055ACA5F57C30

(process:1257091): Gtk-WARNING **: 09:29:23.661: Tried to remove non-child 0x55aca5f57c30

I am currently assuming that maybe this is a lack of documentation on the GTK part that you're not intended to use Box Widgets (or any widget that isn't a PreferenceRow) with ExpanderRow.

I have opened a thread on gnome's discourse forum regarding this.
Maybe this will shine some light on the situation

from owlkettle.

PhilippMDoerner avatar PhilippMDoerner commented on June 2, 2024

I'm getting a bit closer here. This might actually be a bug in Adwaita and not owlkettle (see latest posts in the forum thread).

To test this I made a custom widget with expander-row and did creating the expanderRow Widget, creating the box, adding it and removing it directly in the beforeBuild hook:

#adw.nim
renderable DummyExpander of PreferencesRow:
  
  hooks:
    beforeBuild:
      state.internalWidget = adw_expander_row_new()
      let newBox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 0.cint)
      echo "NewBox Pointer: ", newBox.pointer.repr
      adw_expander_row_add_row(state.internalWidget, newBox)
      adw_expander_row_remove(state.internalWidget, newBox)

# example.nim
import owlkettle, owlkettle/adw

viewable App:
  discard
method view(app: AppState): Widget =
  result = gui:
    Window:
      DummyExpander()

adw.brew(gui(App()))

This also produces the issue.
I currently see this as a strong indicator with the issue not lying with owlkettle here.

from owlkettle.

PhilippMDoerner avatar PhilippMDoerner commented on June 2, 2024

Filed a bugreport with the adwaita repository on gnome's gitlab:
https://gitlab.gnome.org/GNOME/libadwaita/-/issues/758

from owlkettle.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.