Important: The information in this document is obsolete and should not be used for new development.
MyModalFilterYD
A modal-dialog filter function whose address is passed toCustomGetFileorCustomPutFileshould have the following form:
FUNCTION MyModalFilterYD (theDialog: DialogPtr; VAR theEvent: EventRecord; VAR itemHit: Integer; myDataPtr: Ptr): Boolean;
theDialog- A pointer to the dialog record of the dialog box.
theEvent- The event record for the event.
itemHit- The number of the item selected.
myDataPtr- A pointer to the optional data whose address is passed to
CustomGetFileorCustomPutFile.DESCRIPTION
Your modal-dialog filter function determines how the Dialog Manager procedureModalDialogfilters events. TheModalDialogprocedure retrieves events by calling the Event Manager functionGetNextEvent. The Standard File Package contains an internal filter function that performs some preliminary processing on each event it receives. If you provide a modal-dialog filter function,ModalDialogcalls your filter function after it calls the internal Standard File Package filter function and before it sends the event to your dialog hook function.Your modal-dialog filter function returns a Boolean value that reports whether it handled the event. If your function returns a value of
FALSE,ModalDialogprocesses the event through its own filters. If your function returns a value ofTRUE,ModalDialogreturns with no further action.SEE ALSO
See "Writing a Modal-Dialog Filter Function" on page 3-28 for a sample modal-dialog filter function.