Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inheriting SpanBuffer and Input #18

Open
patrickbkr opened this issue May 23, 2024 · 2 comments
Open

Inheriting SpanBuffer and Input #18

patrickbkr opened this issue May 23, 2024 · 2 comments

Comments

@patrickbkr
Copy link

It's currently not possible to does both SpanBuffer and Input in the same class, as both inherit from Terminal::Widgets::Widget. But I would like to do so in my in progress RichText widget. I'm currently experimenting with not having Input be a TW::Widget, but haven't gotten it working yet.

@japhb
Copy link
Owner

japhb commented May 23, 2024

Oh, hmm. Yeah, I probably would have hit that relatively soon myself. Hmmm, I wonder if ising one of the roles (and thus inheriting from its pun class) would be a good enough workaround for now?

Can you give that a try?

@patrickbkr
Copy link
Author

I tried that already. Both can't be punned as both have a stub method. I did succeed yesterday in making Input not inherit Widget anymore though. (I simply pushed the is Widget down to the Doers of Input.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants