GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.
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
Along with fixes in TabbedPanel and Bubble for issues due to this
UIX: Widget: Warn and skip addition if widget already has parent.
This would highlight the issue, instead of just silently fixing it but could this break existing
code for people? Should we just raise a warning and add the widget any ways?
Then, i would prefer an exception than a warning ? What do you think ?
I agreed that this shouldn't be the case, and we could fail correctly.
UIX:add_widget: raise Exception instead of just a warning on multiple
Is the initialization is really needed ? It shouldn't be, remove it.
At line 158 the BubbleContent's parent is being set to self. which prevents the addition of the content to the bubble itself because the parent already exists.
Update: I think that(parent=self) part is needed because of this c0997c8
I didn't seen the writing before, but don't use ''.join() for formatting, use the string / repr like that:
raise WidgetException('Cannot add %r, it already has a parent %r' % (
%r = repr(arg)
UIX:Widget clean WidgetException remove ''.join
Merge pull request #585 from kivy/add__widget
UIX: Widget: Raise Exception if widget already has parent.