enthought / enthought/qt_binder
`Binding` does not work as expected for lists
- Dominant language
- Python
- Stars
- 20
- Forks
- 4
- PR merge metrics
- No merged PRs in 30d
Description
This may be a deliberate design decision, in which case we can close this issue and it can be worked around.
The synced bindings to a `Bound` object (created via `<<`, `>>`, or `:=`) do not respond to changes to a list's items (changing an item in a list, or appending), they only respond to re-assignments.
I've had minimal success by creating the binding via the `sync_trait` method (see the branch `binding_sync_trait` on this repo). However, that does honor the initialization rules laid out in the docs, and it breaks the logic with setting extended attributes or objects on child binders. So I don't think this is a viable solution. Perhaps the solution is to generate a different handler method if both attributes are lists, similar to what is happening within `sync_traits` (ref: https://github.com/enthought/traits/blob/master/traits/has_traits.py#L2701)
Thoughts?
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.