[BUG] Morphs and lefthand-side vertical scrollbars

Ned Konz ned at squeakland.org
Thu Mar 3 00:44:53 UTC 2005


On Wednesday 02 March 2005 3:58 pm, Tim Rowledge wrote:
> Markus Fritsche <Fritsche.Markus at gmx.net> wrote:
> > I have the preference "inboardScrollbars" on, "scrollBarsOnRight" off
> > and "alwaysShowVScrollbar" off (Scrollbar? ScrollBar? scrollBar? Just
> > kidding), and newly opened Workspaces do display the contained text a
> > bit to the right (the size of the scrollbar), when I resize the window,
> > the text is alligned properly.
>
> Yup, I complained about this some time back. It _used_ to work ok,
> though I must admit I can't remember the update number.

I introduced it in CS 6179, by short-circuiting the effect of "self extent: 
self extent" which was being done in several places (for its side-effects, of 
course).

This code probably needs to be refactored so that:
(a) calling extent: can't recurse, and
(b) the scroll bars get shown and hidden at appropriate times.

Without that change, we sometimes see infinite recursion:

PluggableTextMorph>>extent:
PluggableTextMorph>>resetExtent
PluggableTextMorph(ScrollPane)>>hideScrollBar
PluggableTextMorph(ScrollPane)>>hideOrShowScrollBar
PluggableTextMorph(ScrollPane)>>setScrollDeltas
PluggableTextMorph>>extent:
PluggableTextMorph>>resetExtent
PluggableTextMorph(ScrollPane)>>showScrollBar
PluggableTextMorph(ScrollPane)>>hideOrShowScrollBar
PluggableTextMorph(ScrollPane)>>setScrollDeltas

Of course, none of the scrollbar operations really need to change the extent; 
I think they were calling resetExtent because of its side-effect of fixing 
the internal layout.

So the layout-fixing operations need to be factored out of these methods
-- 
Ned Konz
http://bike-nomad.com/squeak/



More information about the Squeak-dev mailing list