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:
getSizeSelector is the selector for a method that returns the size of the list that is to be displayed.
getListElementSelector is a selector that requests a single item. The regular
getListSelector that is normally used with PluggableListMorph's may be safely left nil – it won't be called, if these other two selectors are specified.