You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I think I'm missing something simple here. I haven't been able to figure out how to attach a history to a Buffer in the full screen application. I'm using a TextArea widget for the input, and it doesn't seem to support passing of a history to it, which BTW would be a wonderful feature request. I've also tried to create my own widget based on the TextArea class where I've added a history to the included Buffer, which seems to instantiate without issue, but not to activate the history. Perhaps in a full screen application I also have to add a Key.Up binding to it somehow as well?
And as a second related feature request, I think it would help a lot of people to have this solution added to the examples/full-screen/calculator.py example. In fact, since you are more familiar with the calculator code, even a brief explanation of how to add history to it would help me address my own issue.
BTW, thank you very much for all the wonder examples in 2.0. I struggled in using 1.x full-screen applications and eventually settled with just using basic prompt features, but all your examples for full-screen apps in 2.0 has me migrating all of my apps from basic prompt feature to full screen features.
The text was updated successfully, but these errors were encountered:
In order to make the history work with a Buffer, the Buffer needs an accept_handler. That way, the enter key binding will call buffer.validate_and_handle() and add the entry to the history.
The TextArea does indeed not have a history argument yet. I will consider adding it, but that's at least for after the release of 2.0 to Pypi.
Thanks for the feature requests. It's always good to get feedback. :-)
I think I'm missing something simple here. I haven't been able to figure out how to attach a history to a Buffer in the full screen application. I'm using a TextArea widget for the input, and it doesn't seem to support passing of a history to it, which BTW would be a wonderful feature request. I've also tried to create my own widget based on the TextArea class where I've added a history to the included Buffer, which seems to instantiate without issue, but not to activate the history. Perhaps in a full screen application I also have to add a Key.Up binding to it somehow as well?
If you are interested, my base code is at https://github.com/ControlThingsTools/ctserial
And as a second related feature request, I think it would help a lot of people to have this solution added to the examples/full-screen/calculator.py example. In fact, since you are more familiar with the calculator code, even a brief explanation of how to add history to it would help me address my own issue.
BTW, thank you very much for all the wonder examples in 2.0. I struggled in using 1.x full-screen applications and eventually settled with just using basic prompt features, but all your examples for full-screen apps in 2.0 has me migrating all of my apps from basic prompt feature to full screen features.
The text was updated successfully, but these errors were encountered: