home *** CD-ROM | disk | FTP | other *** search
Text File | 1991-05-01 | 16.8 KB | 920 lines | [TEXT/MPS ] |
- /*
- ErrorMgr.r
- MacApp® Error manager Resources
- Copyright © 1990 Apple Computer, Inc. All rights reserved.
- */
-
- /* • Auto-Include the requirements for this source */
- #ifndef __TYPES.R__
- #include "Types.r"
- #endif
-
- #ifndef __MacAppTypes__
- #include "MacAppTypes.r"
- #endif
-
- #ifndef __ViewTypes__
- #include "ViewTypes.r"
- #endif
-
- /* NOTE:
-
- By Toolbox convention, the OK button is item 1 and the Cancel button
- is item 2.
- */
-
- /* one of 3 alerts for indicating errors */
- resource 'DITL' (phGenError,
- #if qNames
- "phGenError",
- #endif
- purgeable) {
- { /* array DITLarray: 3 elements */
- /* [1] */
- {120, 198, 138, 272},
- Button {
- enabled,
- "OK"
- };
- /* [2] */
- /* ^0 = reason for error; e.g., 'the disk is locked'
- ^1 = how to recover; e.g., 'Eject the disk and move the tab.'
- ^2 = what operation failed; e.g., 'save the document'
- */
-
- {10, 70, 115, 272},
- StaticText {
- disabled,
- "Could not ^2 because ^0. ^1"
- };
- /* [3] */
- {10, 20, 42, 52},
- Icon {
- disabled,
- 0
- }
- }
- };
-
- resource 'DITL' (phCmdErr,
- #if qNames
- "phCmdErr",
- #endif
- purgeable) {
- { /* array DITLarray: 3 elements */
- /* [1] */
- {120, 198, 138, 272},
- Button {
- enabled,
- "OK"
- };
- /* [2] */
- /* ^0 = reason for error; e.g., 'the disk is locked'
- ^1 = how to recover; e.g., 'Eject the disk and move the tab.'
- ^2 = what menu command failed; e.g., 'New'
- */
-
- {10, 70, 115, 272},
- StaticText {
- disabled,
- "Could not complete the “^2” command because ^0. ^1"
- };
- /* [3] */
- {10, 20, 42, 52},
- Icon {
- disabled,
- 0
- }
- }
- };
-
- resource 'DITL' (phUnknownErr,
- #if qNames
- "phUnknownErr",
- #endif
- purgeable) {
- { /* array DITLarray: 3 elements */
- /* [1] */
- {120, 198, 138, 272},
- Button {
- enabled,
- "OK"
- };
- /* [2] */
- /* ^0 = reason for error; e.g., 'the disk is locked'
- ^1 = how to recover; e.g., 'Eject the disk and move the tab.'
- This alert is used if the program does not provide any indication
- of what operation failed.
- */
-
- {10, 70, 115, 272},
- StaticText {
- disabled,
- "Could not complete your request because "
- "^0. ^1"
- };
- /* [3] */
- {10, 20, 42, 52},
- Icon {
- disabled,
- 0
- }
- }
- };
-
-
- /* used when the space is very low */
-
- resource 'DITL' (phSpaceIsLow,
- #if qNames
- "phSpaceIsLow",
- #endif
- purgeable) {
- { /* array DITLarray: 3 elements */
- /* [1] */
- {70, 198, 88, 272},
- Button {
- enabled,
- "OK"
- };
- /* [2] */
- {10, 70, 65, 272},
- StaticText {
- disabled,
- "Memory space is low. "
- "Some commands may be disabled."
- };
- /* [4] */
- {10, 20, 42, 52},
- Icon {
- disabled,
- 1
- }
- }
- };
-
-
- /* used when the user attempts to run an app on unsupported ROMs */
-
- resource 'DITL' (phUnsupportedConfiguration,
- #if qNames
- "phUnsupportedConfiguration",
- #endif
- purgeable) {
- { /* array DITLarray: 3 elements */
- /* [1] */
- {120, 198, 138, 272},
- Button {
- enabled,
- "OK"
- };
- /* [2] */
- {10, 70, 115, 272},
- StaticText {
- disabled,
- "Your computer lacks the required hardware or system software to run this application."
- };
- /* [3] */
- {10, 20, 42, 52},
- Icon {
- disabled,
- 0
- }
- }
- };
-
- /* used to confirm saving changes to a document when closing or quitting */
-
- resource 'DITL' (phSaveChanges,
- #if qNames
- "phSaveChanges",
- #endif
- purgeable) {
- { /* array DITLarray: 5 elements */
- /* [1] */
- {74, 279, 94, 362},
- Button {
- enabled,
- "Save"
- },
- /* [2] */
- {74, 183, 94, 266},
- Button {
- enabled,
- "Cancel"
- },
- /* [3] */
- {74, 65, 94, 148},
- Button {
- enabled,
- "Don't Save"
- },
- /* [4] */
- {10, 65, 59, 363},
- StaticText {
- disabled,
- "Save changes to the ^2 document “^0” bef"
- "ore ^1?"
- },
- /* [5] */
- {10, 20, 42, 52},
- Icon {
- disabled,
- 2
- }
- }
- };
-
- /* used to confirm a Revert command */
-
- resource 'DITL' (phRevert,
- #if qNames
- "phRevert",
- #endif
- purgeable) {
- { /* array DITLarray: 4 elements */
- /* [1] */
- {74, 299, 94, 362},
- Button {
- enabled,
- "Revert"
- },
- /* [2] */
- {74, 223, 94, 286},
- Button {
- enabled,
- "Cancel"
- },
- /* [3] */
- {13, 65, 62, 311},
- StaticText {
- disabled,
- "Revert to the last saved version of “^0”"
- "?"
- },
- /* [4] */
- {10, 20, 42, 52},
- Icon {
- disabled,
- 2
- }
- }
- };
-
-
- /* used when a document changes unexpectedly on the disk; e.g., if
- the document in on a file server and 2 people open it */
-
- resource 'DITL' (phFileChanged,
- #if qNames
- "phFileChanged",
- #endif
- purgeable) {
- { /* array DITLarray: 4 elements */
- /* [1] */
- {110, 198, 128, 272},
- Button {
- enabled,
- "OK"
- };
- /* [2] */
- {110, 20, 128, 94},
- Button {
- enabled,
- "Cancel"
- };
- /* [3] */
- /* ^0 = name of document
- ^1 = the operation (e.g., 'save' or 'revert')
- */
-
- {10, 70, 105, 272},
- StaticText {
- disabled,
- "The disk copy of “^0” was changed since you last "
- "opened or saved it. Do you want to ^1 anyway?"
- };
- /* [4] */
- {10, 20, 42, 52},
- Icon {
- disabled,
- 2
- }
- }
- };
-
- /* Used when the document cannot be saved unless the original version is
- deleted from the disk. This gives the user a chance to confirm this. */
-
- resource 'DITL' (phPurgeOld,
- #if qNames
- "phPurgeOld",
- #endif
- purgeable) {
- { /* array DITLarray: 4 elements */
- /* [1] */
- {125, 198, 143, 272},
- Button {
- enabled,
- "OK"
- };
- /* [2] */
- {125, 20, 143, 94},
- Button {
- enabled,
- "Cancel"
- };
- /* [3] */
- {10, 70, 120, 272},
- StaticText {
- disabled,
- "There is not enough disk space to save the document "
- "unless the existing copy is deleted first. "
- "Delete existing copy of “^0”?"
- };
- /* [4] */
- {10, 20, 42, 52},
- Icon {
- disabled,
- 2
- }
- }
- };
-
- /* used when the user opens the same document twice */
-
- resource 'DITL' (phReopenDoc,
- #if qNames
- "phReopenDoc",
- #endif
- purgeable) {
- { /* array DITLarray: 3 elements */
- /* [1] */
- {70, 198, 88, 272},
- Button {
- enabled,
- "OK"
- };
- /* [2] */
- /* ^0 = name of document
- */
-
- {10, 70, 65, 272},
- StaticText {
- disabled,
- "“^0” is already open."
- };
- /* [4] */
- {10, 20, 42, 52},
- Icon {
- disabled,
- 1
- }
- }
- };
-
-
- /* used to offer a read-only copy of a file when writing isn't possible */
-
- resource 'DITL' (phOfferReadOnly,
- #if qNames
- "phOfferReadOnly",
- #endif
- purgeable) {
- { /* array DITLarray: 4 elements */
- /* [1] */
- {80, 198, 98, 272},
- Button {
- enabled,
- "OK"
- };
- /* [2] */
- {80, 20, 98, 94},
- Button {
- enabled,
- "Cancel"
- };
- /* [3] */
- /* ^0 = name of document */
- {10, 70, 75, 272},
- StaticText {
- disabled,
- "“^0” can’t be opened for writing. Do you want to open it anyway?"
- };
- /* [4] */
- {10, 20, 42, 52},
- Icon {
- disabled,
- 2
- }
- }
- };
-
- /* Used in dialogs and TEViews when the user exceeds the # of characters */
-
- resource 'DITL' (phTooManyChars,
- #if qNames
- "phTooManyChars",
- #endif
- purgeable) {
- { /* array DITLarray: 3 elements */
- /* [1] */
- {82, 198, 100, 272},
- Button {
- enabled,
- "OK"
- };
- /* [2] */
- {10, 70, 77, 272},
- StaticText {
- disabled,
- "Cannot add any more characters here."
- };
- /* [3] */
- {10, 20, 42, 52},
- Icon {
- disabled,
- 0
- }
- }
- };
-
- resource 'DITL' (phStylesTooBig,
- #if qNames
- "phStylesTooBig",
- #endif
- purgeable) {
- { /* array DITLarray: 3 elements */
- /* [1] */
- {82, 198, 100, 272},
- Button {
- enabled,
- "OK"
- };
- /* [2] */
- {10, 70, 77, 272},
- StaticText {
- disabled,
- "Cannot remember the styles associated with the text. "
- "The text is intact, however."
- };
- /* [3] */
- {10, 20, 42, 52},
- Icon {
- disabled,
- 0
- }
- }
- };
-
- resource 'ALRT' (phGenError,
- #if qNames
- "phGenError",
- #endif
- purgeable) {
- {90, 110, 238, 402},
- phGenError,
- { /* array: 4 elements */
- /* [1] */
- OK, visible, silent;
- /* [2] */
- OK, visible, silent;
- /* [3] */
- OK, visible, silent;
- /* [4] */
- OK, visible, silent
- }
- #if SystemSevenOrLater
- ,
- alertPositionMainScreen
- #endif
- };
-
- resource 'ALRT' (phCmdErr,
- #if qNames
- "phCmdErr",
- #endif
- purgeable) {
- {90, 110, 238, 402},
- phCmdErr,
- { /* array: 4 elements */
- /* [1] */
- OK, visible, silent;
- /* [2] */
- OK, visible, silent;
- /* [3] */
- OK, visible, silent;
- /* [4] */
- OK, visible, silent
- }
- #if SystemSevenOrLater
- ,
- alertPositionMainScreen
- #endif
- };
-
- resource 'ALRT' (phUnknownErr,
- #if qNames
- "phUnknownErr",
- #endif
- purgeable) {
- {90, 110, 238, 402},
- phUnknownErr,
- { /* array: 4 elements */
- /* [1] */
- OK, visible, silent;
- /* [2] */
- OK, visible, silent;
- /* [3] */
- OK, visible, silent;
- /* [4] */
- OK, visible, silent
- }
- #if SystemSevenOrLater
- ,
- alertPositionMainScreen
- #endif
- };
-
- resource 'ALRT' (phSpaceIsLow,
- #if qNames
- "phSpaceIsLow",
- #endif
- purgeable) {
- {100, 110, 198, 402},
- phSpaceIsLow,
- { /* array: 4 elements */
- /* [1] */
- OK, visible, silent;
- /* [2] */
- OK, visible, silent;
- /* [3] */
- OK, visible, silent;
- /* [4] */
- OK, visible, silent
- }
- #if SystemSevenOrLater
- ,
- alertPositionMainScreen
- #endif
- };
-
- resource 'ALRT' (phUnsupportedConfiguration,
- #if qNames
- "phUnsupportedConfiguration",
- #endif
- purgeable) {
- {90, 110, 238, 402},
- phUnsupportedConfiguration,
- { /* array: 4 elements */
- /* [1] */
- OK, visible, silent;
- /* [2] */
- OK, visible, silent;
- /* [3] */
- OK, visible, silent;
- /* [4] */
- OK, visible, silent
- }
- #if SystemSevenOrLater
- ,
- alertPositionMainScreen
- #endif
- };
-
- resource 'ALRT' (phSaveChanges,
- #if qNames
- "phSaveChanges",
- #endif
- purgeable) {
- {86, 60, 190, 432},
- phSaveChanges,
- { /* array: 4 elements */
- /* [1] */
- OK, visible, silent,
- /* [2] */
- OK, visible, silent,
- /* [3] */
- OK, visible, silent,
- /* [4] */
- OK, visible, silent
- }
- #if SystemSevenOrLater
- ,
- alertPositionMainScreen
- #endif
- };
-
- resource 'ALRT' (phRevert,
- #if qNames
- "phRevert",
- #endif
- purgeable) {
- {86, 60, 190, 432},
- phRevert,
- { /* array: 4 elements */
- /* [1] */
- Cancel, visible, silent,
- /* [2] */
- Cancel, visible, silent,
- /* [3] */
- Cancel, visible, silent,
- /* [4] */
- Cancel, visible, silent
- }
- #if SystemSevenOrLater
- ,
- alertPositionMainScreen
- #endif
- };
-
- resource 'ALRT' (phFileChanged,
- #if qNames
- "phFileChanged",
- #endif
- purgeable) {
- {100, 110, 238, 402},
- phFileChanged,
- { /* array: 4 elements */
- /* [1] */
- OK, visible, silent;
- /* [2] */
- OK, visible, silent;
- /* [3] */
- OK, visible, silent;
- /* [4] */
- OK, visible, silent
- }
- #if SystemSevenOrLater
- ,
- alertPositionMainScreen
- #endif
- };
-
- resource 'ALRT' (phPurgeOld,
- #if qNames
- "phPurgeOld",
- #endif
- purgeable) {
- {100, 110, 253, 402},
- phPurgeOld,
- { /* array: 4 elements */
- /* [1] */
- OK, visible, silent;
- /* [2] */
- OK, visible, silent;
- /* [3] */
- OK, visible, silent;
- /* [4] */
- OK, visible, silent
- }
- #if SystemSevenOrLater
- ,
- alertPositionMainScreen
- #endif
- };
-
- resource 'ALRT' (phReopenDoc,
- #if qNames
- "phReopenDoc",
- #endif
- purgeable) {
- {100, 110, 198, 402},
- phReopenDoc,
- { /* array: 4 elements */
- /* [1] */
- OK, visible, silent;
- /* [2] */
- OK, visible, silent;
- /* [3] */
- OK, visible, silent;
- /* [4] */
- OK, visible, silent
- }
- #if SystemSevenOrLater
- ,
- alertPositionMainScreen
- #endif
- };
-
- resource 'ALRT' (phOfferReadOnly,
- #if qNames
- "phOfferReadOnly",
- #endif
- purgeable) {
- {100, 110, 208, 402},
- phOfferReadOnly,
- { /* array: 4 elements */
- /* [1] */
- OK, visible, silent;
- /* [2] */
- OK, visible, silent;
- /* [3] */
- OK, visible, silent;
- /* [4] */
- OK, visible, silent
- }
- #if SystemSevenOrLater
- ,
- alertPositionMainScreen
- #endif
- };
-
- resource 'ALRT' (phTooManyChars,
- #if qNames
- "phTooManyChars",
- #endif
- purgeable) {
- {100, 110, 210, 402},
- phTooManyChars,
- { /* array: 4 elements */
- /* [1] */
- OK, visible, silent;
- /* [2] */
- OK, visible, silent;
- /* [3] */
- OK, visible, silent;
- /* [4] */
- OK, visible, silent
- }
- #if SystemSevenOrLater
- ,
- alertPositionMainScreen
- #endif
- };
-
- resource 'ALRT' (phStylesTooBig,
- #if qNames
- "phStylesTooBig",
- #endif
- purgeable) {
- {100, 110, 210, 402},
- phStylesTooBig,
- { /* array: 4 elements */
- /* [1] */
- OK, visible, silent;
- /* [2] */
- OK, visible, silent;
- /* [3] */
- OK, visible, silent;
- /* [4] */
- OK, visible, silent
- }
- #if SystemSevenOrLater
- ,
- alertPositionMainScreen
- #endif
- };
-
- /* list mapping error codes to failure reasons */
-
- resource 'errs' (errReasonID,
- #if qNames
- "errReasonID",
- #endif
- purgeable) {
- { whichList, 0, errReasonIDStrings;
- -117, -108, 4; // Memory Manager errors
- -42, -42, 21; // too many files are open
- -47, -47, 7; // files are open
- -49, -49, 7; // can't have > 1 writer to a file
- -54, -54, 6; // can't open locked file for writing
- -45, -45, 6; // file locked
- -46, -44, 3; // volumes locked
- -34, -33, 2; // disk full
- -53, -53, 20; // volume offline
- -84, -33, 5; // other File Manager / disk errors
- -124, -124, 14; // Lost volume on AppleTalk
- -127, -120, 5; // HFS errors
- -27, -27, 10; // printer I/O error
- -192, -192, 22; // Resource not found
- -20000, -20000, 8; // MacApp error code: could not spool print file
- -20001, -20001, 11; // MacApp error code: could not revert because file was deleted
- -20003, -20003, 12; // MacApp error code: user tried to Save As or Save a Copy
- // in an opened document
- -20004, -20004, 13; // MacApp error code: user did Revert but file type changed
- -4101, -4101, 9; // printer not found (PAP)
- -4100, -4096, 10; // printer comm error
- -5000, -5000, 15; // AFP access error
- -5006, -5006, 7; // AFP: deny conflict
- -5029, -5000, 14; // AFP errors
- -20005, -20005, 16; // MacApp error code: printer driver file not found
- -95, -91, 17; // AppleTalk operation errors
- -98, -97, 18; // AppleTalk could not be opened
- -20006, -20006, 19; // Can't open file of given type
- -20007, -20007, 23; // Function is not yet implemented
- -20008, -20008, 24; // Class is missing. (Usually due to dead stripping)
- -20009, -20009, 25; // Signature has no corresponding class
- minErr, maxErr, 1
- }
- };
-
-
- /* list mapping error codes to recovery strings */
-
- resource 'errs' (errRecoveryID,
- #if qNames
- "errRecoveryID",
- #endif
- purgeable) {
- { whichList, 0, errRecoveryIDStrings;
- -42, -42, 4;
- -45, -45, 1;
- -4101, -4101, 2;
- -20003, -20003, 3;
- -20005, -20005, 2;
- -20008, -20008, 5;
- -20009, -20009, 5
- }
- };
-
- /* error explanations */
-
- resource 'STR#' (errReasonIDStrings,
- #if qNames
- "error explanations",
- #endif
- purgeable) {
- { /* [1] */ "of a program error"; // catch-all
- /* [2] */ "the disk is full";
- /* [3] */ "the disk is locked";
- /* [4] */ "there is not enough memory";
- /* [5] */ "of a disk error";
- /* [6] */ "the file is locked";
- /* [7] */ "the file is already in use or was left open";
- /* [8] */ "of a problem writing the print file";
- /* [9] */ "the printer could not be found";
- /* [10] */ "of a problem communicating with the printer";
- /* [11] */ "its disk copy was deleted";
- // used when user picks Revert and file was deleted
-
- /* [12] */ "that document is currently open";
- // used when user does Save As or Save a Copy In and specifies a document that is already open
-
- /* [13] */ "its disk copy was changed";
- // used when user does a Revert and the file type has been changed
-
- /* [14] */ "of a problem with the file server"; // catch-all AFP error
- /* [15] */ "you do not have the necessary access privileges"; // AFP: access denied
- /* [16] */ "the selected printing resource could not be found";// Couldn't open print driver
- /* [17] */ "of a problem with AppleTalk"; // AppleTalk operation errors
- /* [18] */ "AppleTalk is not connected"; // AppleTalk open errors
- /* [19] */ "it is not the right kind of document"; // File is the wrong type
- /* [20] */ "the disk is not available";
- // Volume is offline: asynch I/O or command-.
-
- /* [21] */ "there are too many files open"; // Resource not found
- /* [22] */ "the required resources were not found";
- /* [23] */ "this feature is not implemented";
- /* [24] */ "“^3”, an internal component, is missing"; // Missing class
- /* [25] */ "an internal component is missing" // Missing signature
-
- }
- };
-
-
- /* recovery strings */
-
- resource 'STR#' (errRecoveryIDStrings,
- #if qNames
- "recovery strings",
- #endif
- purgeable) {
- { /* [1] */ "Use the “Get Info” command in the Finder"
- " to unlock the file.";
- /* [2] */ "Use “Chooser” to select a printer and try again.";
- // this is used if (1) the chosen LaserWriter can't be found or
- // (2) the chosen printer driver file can't be found
-
- /* [3] */ "Save using a different name, or close the document and try again.";
- /* [4] */ "Try closing some windows and try again.";
- #if qDebug
- /* [5] */ "Call Apple for a secret decoder ring."
- #else
- /* [5] */ "Please contact the developer."
- #endif
- }
- };
-
- /* strings describing the operation; these are used in error alerts */
- resource 'STR#' (errOperationsIDStrings,
- #if qNames
- "strings describing the operation",
- #endif
- purgeable) {
- { /* [1] */ "start the application";
- /* [2] */ "save “^3”";
- /* [3] */ "revert to the previous version of “^3”";
- /* [4] */ "print “^3”";
- /* [5] */ "create a new document";
- /* [6] */ "open “^3”";
- /* [7] */ "save as “^3”";
- /* [8] */ "save a copy in “^3”";
- /* [9] */ "display the contents of the window";
- /* [10] */ "make the clipboard available inside the application";
- /* [11] */ "make the clipboard available outside the application"
-
- }
- };
-
-