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

Make ScrollTableView a part of TableView #1609

Open
TW80000 opened this issue Oct 12, 2018 · 0 comments
Open

Make ScrollTableView a part of TableView #1609

TW80000 opened this issue Oct 12, 2018 · 0 comments

Comments

@TW80000
Copy link

TW80000 commented Oct 12, 2018

Problem definition

ScrollTableView instantiates a TableView. That means that when we want to add a property to TableView, we need to create an identical property on ScrollTableView so that any models that instantiate a ScrollTableView will have the same interface as that of the TableView. ScrollTableView needs the same properties so that it can pass them along to the TableView it instantiates. This duplication is something we'd like to eliminate.

Potential solutions

@kgrgreer said:

A better long-term approach would be to get rid of ScrollTableView and just build it into TableView.
Since it isn't reusable anywhere else. Then have enableScrolling be a flag on TableView. Or, support adding a border to TableView and then it could still be two classes. If you set scrollEnabled on a TableView it would add the ScrollBorder or not. But in either case, you would be working with the TableView directly and would have access to all of its properties without worrying about the decorator losing access to features. We want to decorate the output, not the object itself, so a Border would be better.

So there are at least two possible solutions:

  1. Combine ScrollTableView and TableView
  2. Make something like a ScrollBorder that we can use to decorate TableView
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

1 participant