ScrollPane+TwoWayScrollPane

Doug Way dway at riskmetrics.com
Sun Jul 6 02:55:10 UTC 2003


I agree... either combining them into one class or making them share a 
common superclass would be better than the current situation.  Probably 
combining them into one class would be best, actually. If anyone wants 
to work on this, I'd be happy to review/harvest it.

- Doug Way


On Saturday, July 5, 2003, at 07:00 AM, Daniel Vainsencher wrote:

> 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