[Q] scrolling large collections

Lic. Edgar J. De Cleene edgardec2001 at yahoo.com.ar
Wed Apr 9 20:54:46 UTC 2003


On 09/04/03 17:33, "Eddie Cottongim" <cottonsqueak at earthlink.net> wrote:

> By the way, although an ambitious changeset like Lex's Largelists may not be
> able to gain favor from n squeakers (gaining such acceptance would seem to
> be an O(N!) problem) we could do some minor things to help ScrollPane.
> 
> Specifically, on every scroll it iterates through all its morphs ( I think
> i'm getting this right!) to find their bounds. This as far as I can tell can
> be cached very reasonably to at least double the scrolling speed. Calculate
> it lazily, and invalidate it upon a #layoutChanged. This isn't a total speed
> fix but its simple and a considerable increment.
> 
> If anyone is interested in such changes I'll prepare them (its perhaps 2
> one-liners), but I'm inclined to believe no one is. Of course if I'm
> overlooking something fundamental please let me know.
> 
> Eddie

I be interested  in a TwoWaaySacrollPane such what you could do paste
submorphs inside it and end having a larger no visible drwing.
The submorphs shoud be in no layout mode such as s1 is at: x1 at y1 , s2 at:
x2 at y2 ... Sn at: xn at yn.

AutoScroll1.cs have some of this , but do not have scrollbars and you do not
could click on submorphs and having events of sach submorphs.

Any ideas of how subclasing / modifing existent class ?

Regards
Edgar


> 
> ----- Original Message -----
> From: "Ned Konz" <ned at bike-nomad.com>
> To: "The general-purpose Squeak developers list"
> <squeak-dev at lists.squeakfoundation.org>
> Sent: Wednesday, April 09, 2003 12:52 PM
> Subject: Re: [Q] scrolling large collections
> 
> 
>> On Wednesday 09 April 2003 08:56 am, Martin Drautzburg wrote:
>>> If I want to display items from a list of say a million entries I
>>> can do this with the available ListMorphs. But theses only display
>>> text. What if my items have a graphical (Widget) representation
>>> (for simplicity lets assume they all have the same height).
>>> 
>>> I certainly cannot draw them all and the clip to the visible parts.
>>> I thought I could display a fixed set (say 8) of them and then
>>> change the models of the visible representation when scolling is
>>> done.
>>> 
>>> I just cannot figure out how the ScrollPane works. How do the
>>> events from the scrollbar reach the TransformMorph that does the
>>> actual scrolling ? Is there a place where I could plug in my own
>>> way of scrolling.
>> 
>> The slider in the ScrollBar sends #scrollBarValue: (or some other
>> pluggable selector) to its model, which is often a PluggableListMorph
>> (which is of course a ScrollPane). Then the PLM sends #offset: to its
>> scroller (which is a MorphicTransform).
>> 
>> The way that the ScrollPanes work, though, is that they tend to draw
>> everything and count on clipping to do the work.
>> 
>> You may want to look at Lex's "Large Lists" change set, which
>> optimizes the display of very large lists.
>> 
>> --
>> Ned Konz
>> http://bike-nomad.com
>> GPG key ID: BEEA7EFE
>> 
>> 
> 
> 



More information about the Squeak-dev mailing list