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.61k stars 238 forks source link

Add "return widget" to Layout's add_widget() method to make chaining easier #348

Closed cltrudeau closed 2 years ago

cltrudeau commented 2 years ago

What does this implement/fix?

One line change that adds "return widget" to the end of Layout's add_widget() method. This allows doing one-line layout and creation such as:

self.my_button = layout.add_widget(Button("My Button"), 1)
cltrudeau commented 2 years ago

Hey Peter,

Something weird going on with the build. Fails just for Linux Py3.7. Works find in 3.6 and locally in 3.9. Doesn't seem to be complaining about my change, but something else.

Send me a comment if this is somehow my fault and I'll fix if I can. ...ct

peterbrittain commented 2 years ago

Interesting. Looks like a failure in pip... for a package we shouldn't need anymore! Happy for you to remove the appveyor package as part of this MR.

cltrudeau commented 2 years ago

Interesting. Looks like a failure in pip... for a package we shouldn't need anymore! Happy for you to remove the appveyor package as part of this MR.

Only reference to that that I found was in a requirements.txt file. I removed it, but the problem is still happening.

Other changes have been made as requested.

cltrudeau commented 2 years ago

Hey Peter,

Just curious when the next release will be with the changes to TextBox and other things. No hurry, I've copied the widget into another project, but when the release happens want to get rid of the local copy.

peterbrittain commented 2 years ago

Soon. I don't have any more major updates I want to get in now.

peterbrittain commented 2 years ago

Sigh. Travis support's fix didn't work... Let's see what they come up with next.