home *** CD-ROM | disk | FTP | other *** search
/ AppleScript - The Beta Release / AppleScript - The Beta Release.iso / Development Tools / Object Support Library / OSL•Read Me
Encoding:
Text File  |  1992-11-25  |  1.9 KB  |  44 lines  |  [ttro/ttxt]

  1. Object Support Library
  2. ====================
  3.  
  4. The Object support library is unchanged from version 1.0.  The files
  5.         AEObjects.h
  6.         AEObjects.p
  7.         AEPackObject.h
  8.         AEPackObject.p
  9.         AEObjectSupportLib.o
  10. Have been placed into the Interfaces and Libraries folders under Development
  11. Tools.
  12.  
  13. Previously Undocumented feature note:
  14.  
  15. Since the Developer note on the Object Support Library was written,
  16. we have added a new feature that we hope developers will find useful.
  17. The code implementing AEResolve has been modified so that it can 
  18. pass you the descriptor that was responsible for an error when one
  19. occurs.
  20.  
  21. To use this feature, you pass the address of a routine with the
  22. following interface as the last parameter to AESetObjectCallbacks:
  23.  
  24. FUNCTION MyGetErrDescProc( VAR errDescPtr: DescPtr ) : OSErr ;
  25.  
  26. The library will call this routine once shortly after you call
  27. AEResolve, and will write a null descriptor to the address your
  28. routine returns.  If an error occurs during the resolution of the
  29. object specifier, the library will call your routine again and
  30. write the descriptor -- often an object specifier -- it was working
  31. on when the error occurred to the address your routine returns.
  32.  
  33. Normally you will want to maintain a single global variable of type
  34. AEDesc whose address your MyGetErrDesc routine returns no matter how
  35. many times it is called.  Be careful if you follow any other model:
  36. when recovering from an error, the library will never write to the
  37. address you provide unless it contains a null descriptor.  Thus you
  38. will need to write null descriptors into any addresses you pass that
  39. are different from the address you returned the first time your
  40. routine was called after a given call to AEResolve.
  41.  
  42. Like the rest of the non-accessor callbacks, your GetErrDesc proc can
  43. also be installed and removed using the Apple Event Manager's
  44. SpecialHandler routines.  Use the keyword keyAEGetErrDescProc.