peterbrittain / asciimatics

A cross platform package to do curses-like operations, plus higher level APIs and widgets to create text UIs and ASCII art animations
Apache License 2.0
3.62k stars 237 forks source link

Exceptions raised when trying to set Button .name #298

Closed dwhall closed 3 years ago

dwhall commented 3 years ago

btn = Button("Run", _on_click, name="btn_run") leads to "TypeError: init() got multiple values for argument 'name'"

and

btn = Button("Run", _on_click)
btn.name="btn_run"

leads to "AttributeError: can't set attribute"

Windows 10 Asciimatics @64822eb8

I have a branch on a fork with two unit tests for these exceptions. That branch also has a fix for first error. But I do not know how to solve the second error. I will submit the branch as a pull-request and we can discuss it from there.