Previous Book Contents Book Index Next

Inside Macintosh: Files /


Chapter 3 - Standard File Package

This chapter describes how your application can use the Standard File Package to manage the user interface for naming and identifying files. The Standard File Package displays the dialog boxes that let the user specify the names and locations of files to be saved or opened, and it reports the user's choices to your application.

The Standard File Package supports both standard and customized dialog boxes. The standard dialog boxes are sufficient for applications that do not require additional controls or other elements in the user interface. The chapter "Introduction to File Management" earlier in this book provides a detailed description of how to display
the standard dialog boxes by calling two of the enhanced Standard File Package
routines introduced in system software version 7.0. You need to read this chapter if
your application needs to use features not described in that earlier chapter (such as customized dialog boxes or a special file filter function). You also need to read this chapter if you want your application to run in an environment where the new routines are not available and your development system does not provide glue code that allows you to call the enhanced routines in earlier system software versions.

To use this chapter, you should be familiar with the Dialog Manager, the Control Manager, and the Finder. You need to know about the Dialog Manager if you want to provide a modal-dialog filter function that handles events received from the Event Manager before they are passed to the ModalDialog procedure (which the Standard File Package uses to manage both standard and customized dialog boxes). You need to know about the Control Manager if you want to customize the user interface by adding controls (such as radio buttons or pop-up menus). You need to know about the Finder
if your application supports stationery documents. See the appropriate chapters in
Inside Macintosh: Macintosh Toolbox Essentials for specific information about these system software components.

This chapter provides an introduction to the Standard File Package and then discusses


Chapter Contents
About the Standard File Package
Standard User Interfaces
Opening Files
Saving Files
Keyboard Equivalents
Customized User Interfaces
Saving Files
Opening Files
Selecting Volumes and Directories
User Interface Guidelines
Using the Standard File Package
Presenting the Standard User Interface
Customizing the User Interface
Customizing Dialog Boxes
Writing a File Filter Function
Writing a Dialog Hook Function
Writing a Modal-Dialog Filter Function
Writing an Activation Procedure
Setting the Current Directory
Selecting a Directory
Selecting a Volume
Using the Original Procedures
Standard File Package Reference
Data Structures
Enhanced Standard File Reply Record
Original Standard File Reply Record
Standard File Package Routines
Saving Files
Opening Files
Application-Defined Routines
File Filter Functions
Dialog Hook Functions
Modal-Dialog Filter Functions
Activation Procedures
Summary of the Standard File Package
Pascal Summary
Constants
Data Types
Standard File Package Routines
Application-Defined Routines
C Summary
Constants
Data Types
Standard File Package Routines
Application-Defined Routines
Assembly-Language Summary
Data Structures
Trap Macros
Global Variables

Previous Book Contents Book Index Next

© Apple Computer, Inc.
2 JUL 1996