ScrollPane+TwoWayScrollPane

Daniel Vainsencher danielv at netvision.net.il
Sat Jul 5 11:00:08 UTC 2003


Eliminating dead code is a very good thing, I think your worry is minor
compared to the gains from the change you propose.

Just as an idea to address your concern, without having seen the code,
it might be simple to have one class and two instance creation methods.
Though this would require changing the clients a bit, I don't know how
many references each class has.

Daniel

Eddie Cottongim <cottonsqueak at earthlink.net> wrote:
> Does anyone else think these could use some factoring? At some point in the
> past, TwoWay was copy and pasted from ScrollPane, and hence they share maybe
> 50% or more of the code. ScrollPane gets all the maintenance attention,
> leaving TwoWay behind, even though they are very very similar.
> 
> My first approach would be to have TwoWaySP contain the union of the current
> ScrollPane and TwoWaySP, and have ScrollPane simply disable the horizontal
> scrollers. Any reason this isn't a good idea? It might not be the best OO -
> usually subclasses add behavior to a base, not take away - but its pretty
> simple.
> 
> Thanks for looking,
> Eddie



More information about the Squeak-dev mailing list