links to this page:    
View this PageEdit this PageUploads to this PageHistory of this PageTop of the SwikiRecent ChangesSearch the SwikiHelp Guide
Large Lists
Last updated at 2:41 pm UTC on 16 January 2006
If your PluggableListMorph's use extremely large lists, then you might think about the Large Lists changeset: LargeLists.cs (last updated: February 5, 2004).

There are two speed benefits this package gives over the standard list classes. First, they avoid doing graphics processing for strings outside the currently visible clip area. This benefit applies to all list morphs, with no extra effort from the client.

The second benefit requires a little help from the client. The client can now specify an alternative mechanism for retrieving strings to display, that doesn't require calculating all of the strings at once. If the strings are computed, then this benefit can be quite large. To use this mechanism, the model must have two extra methods: one that returns the number of strings to display, and one that returns a specified individual string that is to be displayed. The list must then be initialized as follows:

 myPLM getSizeSelector: #numFoos
 myPLM getListElementSelector: #getFoo:

is the selector for a method that returns the size of the list that is to be displayed.
is a selector that requests a single item. The regular
that is normally used with PluggableListMorph's may be safely left nil – it won't be called, if these other two selectors are specified.