Programmer's Reference

Suppressing system error dialogs

On some platforms, certain file system errors, such as "drive not ready" and "disk change required," causes a system error dialog to appear. You can suppress this dialog by sending systemErrorDialog: to CfsError class. An example is as follows:

"Get volume info for drive A, ignoring drive not ready."
| state volumeInfo |
"Turn off system error dialog."
state := CfsError systemErrorDialog: false.
 
"Get volume info for drive A:"
volumeInfo := CfsVolumeInfo volumeInfo: 'A:\'.
"Reset system error dialog to original state"
CfsError systemErrorDialog: state.
^volumeInfo
Tip:On platforms that do not support dialog suppression, systemErrorDialog: has no effect.


[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]