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

LabelEntry doesn't completly removes with the .removesEntry method and can cause duplicate error #643

Open
MatMatty opened this issue Aug 2, 2021 · 1 comment
Labels

Comments

@MatMatty
Copy link

MatMatty commented Aug 2, 2021

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)

@jarvisteach
Copy link
Owner

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants