Open MatMatty opened 3 years ago
This looks to be a genuine bug, and across all labelled widgets. It seems the container & label are removed but not the actual main widget. It also looks like there's no testing of removing labelled widgets in the test scripts.
Adding the mentioned line of code to the removeWidgetType()
function would resolve this.
But I think it should be a call to cleanseWidgets()
instead.
Bug Report
Context
Managing LabelEntry widget (removing) then adding another LabelEntry widget with the same name as the one deleted
Expected Behaviour
Nothing special
Actual Behaviour
Duplicate Error
Any error messages produced by appJar
Duplicate widget
Sample code, demonstrating the issue
app = gui() app.addLabelEntry("test") app.removeEntry("test") app.addLabelEntry("test") app.go()
Remark
I've been able to make it work anyway by deleting "manually" the widget in the WidgetManager's dictionary with 'app.widgetManager.remove(2, "test")' (2 being the Entry widget's ID)