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
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.
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:
Combine ScrollTableView and TableView
Make something like a ScrollBorder that we can use to decorate TableView
The text was updated successfully, but these errors were encountered:
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:
So there are at least two possible solutions:
The text was updated successfully, but these errors were encountered: