mabe02/lanterna

There is callbacks or something like bindable properties?

MairwunNx opened this issue · 4 comments

Hello, I creating mvvmlight framework and I want to add support for lanterna to that. But I didn't see this for example, in TextBlock something like onTextChanged which accepts functional interface, and for other components same.

Does your library are providing something like I need?

@mabe02 if you have support this, please give me response, thanks :)

avl42 commented

Lanterna has a TextBox and this class has a method setTextChangeListener
You pass to it a TextChangeListener instance and this object's onTextChanged method
will then be called whenever the text gets changed. The new text content and a
boolean indicating the source of the change (by program or by user-interaction)
will be passed as arguments to that call.

Does this help?

@avl42 thanks, yes, but unfortunately it does not exist for other components, anyway thank you, I'll just make a fork and add binding properties :)

mabe02 commented

@MairwunNx could you give example of what it would look like?