bczsalba / pytermgui

Python TUI framework with mouse support, modular widget system, customizable and rapid terminal markup language and more!
https://ptg.bczsalba.com
MIT License
2.16k stars 53 forks source link

Fix: WindowManager.add when assign is string #116

Closed Pan6ora closed 1 year ago

Pan6ora commented 1 year ago

I think WindowManager.add() is not working as intended when given a string to the assign argument.

Sorry by advance if y misunderstood how it is supposed to work.

bczsalba commented 1 year ago

getattr(self.layout, assign) actually does the same thing, since Layout's getattr is overridden to allow finding slots:

https://github.com/bczsalba/pytermgui/blob/eb2350ce93313291c4c4a25c475ff4e504c831ba/pytermgui/window_manager/layouts.py#L381-L391

Thank you for the effort though!