Carbon


NavReplyRecord

Header: Navigation.h

When your application calls a Navigation Services function that creates a dialog box, you pass a pointer to a NavReplyRecordstructure. Navigation Services, in turn, uses this structure to provide your application with information about the user’s interactions with the dialog box. When your application is through using the structure, remember to dispose of it by calling the function NavDisposeReply.

struct NavReplyRecord {
    UInt16 version; 
    Boolean validRecord; 
    Boolean replacing; 
    Boolean isStationery; 
    Boolean translationNeeded; 
    AEDescList selection; 
    ScriptCode keyScript; 
    FileTranslationSpecArrayHandle fileTranslation; 
    UInt32 reserved1; 
    char reserved[231];
};

Field descriptions

version

Identifies the version of this structure.

validRecord

A Boolean value of true if the user closes a dialog box by pressing Return or Enter, or by clicking the default button in an Open or Save dialog box. If this field is false, all other fields are unused and do not contain valid data.

replacing

A Boolean value of true if the user chooses to save a file by replacing an existing file (thereby necessitating the removal or renaming of the existing file).

isStationery

A Boolean value informing your application whether the file about to be saved should be saved as a stationery document.

translationNeeded

A Boolean value indicating whether translation was or will be needed for files selected in Open and Save dialog boxes.

selection

An Apple event descriptor list (AEDescList) created from references to items selected through the dialog box. Navigation Services creates this list, which is automatically disposed of when your application calls the function NavDisposeReply. You can determine the number of items in the list by calling the Apple Event Manager function AECountItems. Some dialog boxes may return one or more items; a Save dialog box will always return one. Each selected HFS file object is described in an AEDesc structure by the descriptor type 'typeFSS'. You can coerce this descriptor into an FSSpec structure to perform operations such as opening the file. For more information, see “Obtaining Object Descriptions”.

keyScript

The keyboard script system used for the filename.

fileTranslation

A handle to a Translation Manager structure of type FileTranslationSpec. This structure contains a corresponding translation array for each file reference returned in the selection field. When opening files, Navigation Services will perform the translation automatically unless you set the kNavDontAutoTranslate flag in the dialogOptionFlags field of the structure NavDialogOptions. When Navigation Services performs an automatic translation, the FileTranslationSpec structure is strictly for the Translation Manager’s use. If you turn off automatic translation, your application may use the FileTranslationSpec structure for your own translation scheme. If the user chooses a translation for a saved file, the FileTranslationSpec structure contains a single translation reference for the saved file and the translationNeeded field of the NavReplyRecord structure is set to true. The handle to the FileTranslationSpec structure is locked, so you can safely use dereferenced pointers. For more information, see “Translating Files on Open” and “Translating Files on Save”.

reserved1
reserved

When your application calls a Navigation Services function that creates a dialog box, you pass a pointer to a NavReplyRecord structure. Navigation Services, in turn, uses this structure to provide your application with information about the user’s interactions with the dialog box. When your application is through using the structure, remember to dispose of it by calling the function NavDisposeReply.


© 2000 Apple Computer, Inc. (Last Updated 6/30/2000)