About ScrollPane Obsolete methods and TwoWaysScrollPane
Doug Way
dway at mailcan.com
Sat Jul 10 02:18:36 UTC 2004
On Friday, July 9, 2004, at 11:58 AM, stéphane ducasse wrote:
> Hi all
>
> It would be good to remove the obsolete methods contained in the
> ScrollPane class.
> I checked and none of the methods is called in the image. I was going
> to deprecate them.
It looks like all of the methods in the "OBSOLETE" method category for
ScrollPane are already deprecated in 3.7beta. So I think we're okay
there... these deprecated methods will be removed at the beginning of
3.8alpha.
> However, some of them are also implemented by TwoWayScrollPane.
> So apparently the idea was that ScrollPane and TwoWayScrollPane should
> be polymorphic
> but this does not make sense if part of the common interface is
> obsolete in ScrollPane.
Actually with Steven Swerling's changes in 3.7, ScrollPane can now do
everything that TwoWayScrollPane used to do (as far as I can tell). As
an example, I just changed the existing method
Morph>>inATwoWayScrollPane to use "ScrollPane new" instead of
"TwoWayScrollPane new", and it works just fine. (The only difference
being that the scrollbars are now the correct size.) ScrollPane is
basically a two-way scroller by default now, unless you specifically
tell it to scroll in only one direction (as PluggableTextMorph does for
example).
So the best course of action is probably to dump TwoWayScrollPane
completely. Er, I guess we should "deprecate" it before deleting it,
so people have some time to convert existing references to use
ScrollPane. Hmm, how to deprecate an entire class... I guess you could
deprecate all of the methods in the class. At this point maybe we
should just deprecate it in 3.8alpha so it will be gone in the
following version.
It'll be nice to get rid of TwoWayScrollPane, since it duplicated a lot
of the code from ScrollPane, and it tended to fall behind in its
implementation.
- Doug
More information about the Squeak-dev
mailing list
|