beeware / toga

A Python native, OS native GUI toolkit.
https://toga.readthedocs.io/en/latest/
BSD 3-Clause "New" or "Revised" License
4.36k stars 674 forks source link

Widget removal not working on Linux (Ubuntu 18.04) #971

Closed waitsfornone closed 4 years ago

waitsfornone commented 4 years ago

Describe the bug While attempting to remove a child of a Box Widget, I get the following error:

AttributeError: 'Box' object has no attribute 'remove_child'

To Reproduce Steps to reproduce the behavior:

  1. Download this repo https://github.com/waitsfornone/hangman
  2. Change branch to gtk_remove_bug
  3. Run app (only dependency is Toga)
  4. Exception should bubble up from line 45 in hangman.py

Expected behavior I expected to be able to remove the child by the reference

Environment: Ubuntu 18.04 (64-bit) Python 3.8.1 Toga 0.3.0dev22

filyc commented 4 years ago

Hi Folks, I see a similar error on Windows--even with Box.add, since that also potentially calls remove when adding to new parent.