Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

ReferenceListProperty doesn't allow changing individual properties #823

gebart opened this Issue Nov 27, 2012 · 0 comments


None yet
1 participant

gebart commented Nov 27, 2012

The ReferenceListProperty class only modifies the linked properties if an entire tuple is assigned to the property. The simplest example is trying to assign:

widget.x = 100 # works
widget.pos[0] = 123
print(widget.x) # prints '100', expected 123
#although this works:
widget.pos = (123, widget.y)
print(widget.x) # prints '123' as expected

If this was intentional behaviour, the program should crash or otherwise alert the developer in some way, right now the assignment is to a copy of the element and just disappears without any notice.

I spoke with @tshirtman on IRC about this, he agreed that it would be desirable if the ReferenceListProperty props allow changing their elements without assigning the whole thing.

@Ian-Foote Ian-Foote added a commit to Ian-Foote/kivy that referenced this issue Jul 21, 2013

@Ian-Foote Ian-Foote Add testcase for issue #823. 2a0e246

@tito tito closed this in b464278 Jul 21, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment