ADC Home > Reference Library > Technical Notes > Legacy Documents > Mac OS 9 & Earlier >
Important: This document is part of the Legacy section of the ADC Reference Library. This information should not be used for new development.
Current information on this Reference Library topic can be found here:
|
Avoid Macintosh List Manager for manipulating large matricesAvoid using the Macintosh List Manager for manipulating large matrices like spreadsheet cells. The Macintosh List Manager becomes ungainly when handling more than about 500 cells. With several thousand cells, such as a 100x100 matrix, it becomes downright klunky. Using standard techniques, the List Manager can store only 32K of data in a list. For 10,000 cells, this gives you only about 3.2 characters in a cell. It's possible to switch to a system where each cell contains a pointer to text to be drawn, but with only 3.2 characters, it's not possible to store a full pointer (4 bytes). After about 500 cells, the time needed to actually set the data in the cells becomes noticeable, on the order of 10 to 15 seconds. Finally, the List Manager has some pretty fundamental restrictions. You cannot, for instance, create variable-width rows or columns, or hide a single row or column from a list. For manipulating large matrices, you're much better off bypassing the List Manager entirely and writing your own spreadsheet-type mechanism. Consider caching the cells to a temporary file, depending on your memory requirements. You'll need to use the Control Manager to set up and process scroll bars, and you should use QuickDraw to draw the contents of the cells. Basically, writing a spreadsheet shares many of the same necessary functions and problems as writing a text editor (replacing TextEdit). Neither one is simple, but both are possible. Creating Macintosh columns with various widthsDate Written: 2/8/91 Last reviewed: 6/14/93 How can I create a Macintosh List Manager list with different size cells for some columns and different size cells for other columns?
The List Manager doesn't allow variable-sized cells. One cell size fits all, or
not! The List Manager was designed for simple lists (such the standard
get file dialog), but not for spreadsheets. The source of the limitation is
found in the You can write your own List definition procedure, which can display alternative data types (PICTS, ICONS, or perhaps some data type of your own devising), but these are still limited to one cell size for the entire list. If you wish to have columns with various widths, you will need to treat each column as a separate list, or handle the lists entirely yourself as spreadsheet and database applications do. Code for putting a list in a modal dialog boxDate Written: 1/23/92 Last reviewed: 6/14/93 How do I put a list in a Macintosh modal dialog box?
The sample code below puts a list in a modal dialog. There are several points
to note to ensure success: You need to pass a draw procedure to the modal
dialog for your list item. It's important to test for
The sample also tests
Downloadables
|
|