File Panel Messages

The file panel produces three messages: B_REFS_RECEIVED, B_SAVE_REQUESTED, and B_CANCEL. The first of these was discussed in "General Messages". It's produced when the user picks files to open from the panel. The other two messages are described below.

B_SAVE_REQUESTED

The file panel produces this message when the user asks the application to save a document. It has two data fields:

FieldType codeDescription
directoryB_REF_TYPEAn entry_ref referring to the directory where the document should be saved.
nameB_STRING_TYPEThe file name under which the document should be saved.

B_CANCEL

A cancel notification is sent whenever a file panel is hidden. This includes the Cancel button being clicked, the panel being closed, and the panel being hidden after an open or a save.

FieldType codeDescription
old_whatB_INT32_TYPEThe "previous" what value. This is only useful (and dependable) if you supplied the BFilePanel with your own BMessage: The what from your message is moved to the old_what field. If you didn't supply a BMessage, you should ignore this field (it could contain garbage).
sourceB_POINTER_TYPEA pointer to the BFilePanel object.