home *** CD-ROM | disk | FTP | other *** search
/ Otherware / Otherware_1_SB_Development.iso / mac / util / diskfile / deskchec.sit / About DeskCheck next >
Encoding:
Text File  |  1989-04-05  |  7.5 KB  |  115 lines

  1.  
  2. This draft updated April 5, 1989.
  3. E.Vishniac / P.O. Box 1357 / East Arlington, MA 02174
  4.  
  5.  
  6. DeskCheck examines every file on every available disk, looking for resource files with defective "bundles."  A file's bundle (BNDL) resource describes the relationship between a file creator (identified by a four-character signature), any number of file types (also identified by four-character signatures), and a set of icons.  Errors in the bundle or in related resources can cause severe problems for the Finder.
  7.  
  8. For a detailed explanation of the BNDL resource, see Inside Macintosh, volume III, page 12.  Another source on the topic is Programming the Macintosh in Assembly Language, page 437.  Bundles are also explained in the documentation that accompanies some public domain icon manipulation programs, such as Bind Icon.
  9.  
  10. Following are the alerts from DeskCheck, listed by ALRT number with a short explanation of each one's significance.  ^0, ^1, ^2, and ^3 indicate text which is supplied at run-time.
  11.  
  12.  
  13. 128: "Welcome to DeskCheck!"
  14.  
  15. This alert is normal.
  16.  
  17. 129: "All done."
  18.  
  19. This alert is normal.
  20.  
  21. 130: "SetVol Failed!  Error code = ^0."
  22.  
  23. DeskCheck was unable to move to some directory in the course of its search.  This should never happen.
  24.  
  25. 131: "OpenResFile failed!  Error code = ^0."
  26.  
  27. DeskCheck attempts to check every file that has a resource fork.  Some files have bogus resource forks, which cause errors when an attempt is made to open them as resource files.  In extreme cases, the Mac may bomb in OpenResFile.
  28.  
  29. 132: "This file has one or more BNDLs, but the bundle bit is not set.
  30.       Number of BNDL resources = ^0."
  31.  
  32. In the case of the Desktop file, this is normal.  For any other file, it warns that the Finder won't take any notice of the file's bundle because the bundle bit is off.  If nothing else is wrong with the file, you can just turn the bundle bit on using ResEdit, FEdit, or some other disk utility program.  If the file has other problems, the Finder may turn the bundle bit off again.
  33.  
  34. 133: "BNDL ^0 has ^1 resource types instead of the expected 2."
  35.  
  36. BNDL resources normally have two lists of resources: one for ICN# resources and one for FREF resources.  A different number of lists is unusual, but not necessarily a problem.  A BNDL with only one resource list is useless; a BNDL with more than two has unused parts.  You can add missing lists, or remove excess ones, with ResEdit.
  37.  
  38. 134: "The signature resource listed in BNDL ^0, ^1 ^2, is missing."
  39.  
  40. An application's "signature" is the unique four-character identifier which connects it with the documents it creates or uses.  The signature resource is a resource whose resource type is the same as the creator of files associated with the application.  The signature is listed in the application's bundle (BNDL) resource.
  41.  
  42. 135: "BNDL ^0 refers to resource type '^1'.  The usual types are 'FREF' and 'ICN#'."
  43.  
  44. Types other than ICN# and FREF in the bundle are unusual, but not necessarily an error.  See alert 133.  You can remove excess resource lists using ResEdit.
  45.  
  46. 136: "BNDL ^0 is too short!"
  47.  
  48. DeskCheck parses each bundle to be sure that the actual resource length is long enough to contain the bundle's required fields and lists.  A bundle resource that's too short is a severe error.  The best course is to delete the existing bundle and start over.
  49.  
  50. 137: "BNDL ^0 is longer than expected."
  51.  
  52. DeskCheck parses each bundle to be sure that the actual resource length is no longer than required to contain the bundle's required fields and lists.  A bundle that's too long is unusual, but not necessarily a problem.  To correct this condition, use ResEdit to open the bundle resource.  Make a non-change, such as changing a field to the value it already has, then close and save the file.
  53.  
  54. 138: "ICN# ^2 is ^3 bytes instead of the usual 256."
  55.  
  56. ICN# resources have a fixed format, with a length of exactly 256 bytes.  A different length is a minor error.  As with bundles (see alert 137), you can fix it by opening the ICN# in ResEdit, tweaking it so that ResEdit thinks it's modified, then closing and saving the file.
  57.  
  58. 139: "FREF ^2 is only ^3 bytes, which is less than the minimum FREF size of six."
  59.  
  60. An FREF consists of a required signature (four bytes) and ICN# local ID (two bytes), optionally followed by a string (zero to 256 bytes).  So, an FREF could reasonably be any size from six to 262 bytes.  An FREF of less than six bytes is a severe error.  The best course is to remove it and build a replacement with ResEdit.
  61.  
  62. 140: "FREF ^2 is ^3 bytes long, which exceeds the maximum FREF size of 262."
  63.  
  64. An FREF which runs past the maximum length of 262 bytes is unusual, but not necessarily a problem.  You can fix this by updating the resource with ResEdit.  See alerts 137 and 138.
  65.  
  66. 141: "BNDL ^0 refers to resource ^1 ^2, which is missing."
  67.  
  68. DeskCheck verifies that all resources listed in the bundle are actually present in the same file.  A missing resource is a severe error.  Either edit the bundle to remove the reference to the missing resource, or use ResEdit to remedy the lack.
  69.  
  70. 142: "Check contents of volume "^0"?"
  71.  
  72. This inquiry is normal.
  73.  
  74. 143: "BNDL ^0 does not contain the usual list of ICN# resources."
  75.  
  76. This is not necessarily a problem, but means the bundle isn't much good.  In fact, it's useless.
  77.  
  78. 144: "BNDL ^0 does not contain the usual list of FREF resources."
  79.  
  80. This is not necessarily a problem, but means the bundle isn't much good.
  81.  
  82. 145: "BNDL ^0 refers to FREF ^1, whose icon local ID is ^2.
  83.       This local ID is unresolved.  That is, it is not the local ID of any member
  84.       of the ICN# resource list in the same bundle."
  85.  
  86. Each FREF associates a file type with an ICN# resource.  The ICN# is identified by a local ID, which is mapped to the ICN#'s real ID through the ICN# list in the bundle itself.  An unresolved local ID is a severe error.  Use ResEdit to see the ICN# local IDs, then edit the offending FREF to refer to one of them.
  87.  
  88. 146: "This file's bundle doesn't assign an icon to this file.
  89.       There's no FREF with a file type that matches this file's type,
  90.       which is '^0'."
  91.  
  92. In the case of the Desktop file, this alert is normal.  For any other file, it suggests that the bundle isn't complete.  This is not necessarily a problem, but means that the file will appear with a default icon on the desktop.
  93.  
  94. 147: "This file's bundle doesn't appear to be for this file.
  95.       The OwnerName in the bundle doesn't match the file's creator,
  96.       which is '^0'."
  97.  
  98. In the case of the Desktop file, this alert is normal.  For any other file, it warns that the file's bundle doesn't match information about the file itself.
  99.  
  100. 148: "This file's bundle bit is set, but it hasn't even got a resource fork."
  101.  
  102. A file without a resource fork certainly doesn't have a bundle resource.  This condition may confuse the Finder about the relationship between documents and applications.  Use ResEdit or a disk utility to clear the bundle bit on the file.
  103.  
  104. 149: "This file's bundle bit is set, but it has no BNDL resource."
  105.  
  106. This seems to be a harmless affectation.  THINK's Lightspeed C¬ is unusually eager to set the bundle bit on applications, so you'll probably get this complaint about every LSC application that lacks a bundle resource.
  107.  
  108. 150: "ICN# ^2 has a blank image area.  That is, the first 128 bytes are all zeroes."
  109.  
  110. This cosmetic defect makes the file nearly invisible in Finder windows.  Use ResEdit to draw a better-looking ICN#.
  111.  
  112. 151: "ICN# ^2 has a blank mask area.  That is, the second 128 bytes are all zeroes."
  113.  
  114. This defect makes certain versions of the Finder freeze when the file with such an ICN# is selected.  Use ResEdit to put some useful data in the mask area of the ICN#.
  115.