TOPIC
Why does the Open dialog box in an application not display all of the files in a folder?
DISCUSSION System 6, System 7 through Mac OS 8.1 This is a real world limitation imposed by the use of List Manager in the SFGetFile dialog box used for opening files. There's nothing wrong with the directory structure, nor is there anything wrong with the application. Here's a description of what's going on: This limitation isn't specific to System 7.0. The same limitation (with a slightly different variation) existed under System 6. The issue is that the SFGetFile call, which generates the Open dialog box in almost every application, uses the List Manager to display the files in the file list of the dialog box. The List Manager has a specific limit on the amount of data stored in a list. This limit is 32K. However, SFGetFile uses a portion of that 32K for data other than the file names. So you end up with 64 bytes per file if you have the maximum file name size of 31 characters (plus 1 byte for the length byte). We arrived at this number empirically by writing a program that created files with the names: "000abcdefghijklmnopqrstuvwxyzab" through "999abcdefghijklmnopqrstuvwxyzab". A good approximation of how many files will display is 32767 / (file name size + 32). This results in 682 for 16 character names and 819 for 8 character names. The bottom line beyond all of these calculations is that this is a hard limit. There's no workaround to display more data from a single folder within this dialog box. The list displays alphabetically, and the bottom of the list isn't displayed. Also, as you increase the number of files in a folder, the performance at the Finder level decreases dramatically. Although the Finder can handle these numbers of files, you'll see slowdowns in opening and closing windows. Another concern is the total number of files you're planning to have on a volume. There are very real limits on this as well, described in other articles posted in the Tech Info Library. While the problem remains in System 7.5, you will now be notified that there are more files in the directory than can be displayed. Mac OS 8.5 And Later Mac OS 8.5 introduced Navigation Services, which is not subject to this limit since it does not use the List Manager. With Navigation Services, the number of files displayed is dependent upon the amount of free RAM. Note that running Mac OS 8.5 (or later)does not automatically deliver this functionality to all applications. In order to use Navigation Services, an application must explicitly call it. Therefore, only newer applications (or those that have been updated for this functionality) could take advantage of Navigation Services. |
Document Information | |
Product Area: | Mac OS System Software |
Category: | General OS |
Sub Category: | General Topics |
Keywords: |
Copyright © 2000 Apple Computer, Inc. All rights reserved.