What Are the AEGizmos? AEGizmos consists of four libraries in one. These libraries provide alternate ways of building and reading Apple events and Apple event descriptors. AEBuild takes a format string ‹ a description in a very simple language of an Apple event descriptor ‹ and generates a real descriptor (which could be a record or list or complete Apple event) of arbitrary complexity out of it. AEPrint does the reverse: given an Apple event descriptor, list or record, it prettyprints it to a string. (The resulting string, if sent to AEBuild, would reproduce the original AEDesc structure.) AEStream provides a stream-based protocol that lets you build descriptors and events in a linear fashion. The descriptor data stays all in one block and grows in discrete increments, so there will be far fewer Memory Manager calls. AESubDescriptors a high-efficiency way to examine and take apart (but not modify) Apple Event descriptors (AEDesc structures). Almost everything is done in place, without any copying of data, which avoids most of the overhead of the Apple Event Manager. However, the API is very similar to that of the Apple Event Manager, which makes it easy to convert your code. Each library also has its own in-depth documentation, in Common Ground format (viewer app included.) What¹s In It For Me? For many common tasks these libraries have clear advantages over the regular Apple Event API: € They run much faster when building complex descriptors. € They use less heap space. € They make your code smaller ‹and easier to write‹ by requiring fewer calls to get things done. (Especially AEBuild, which can often replace an entire page of code with one function call.) € AEPrint, which displays an Apple event or descriptor in human-readable form, can be very helpful in debugging. However, they do have their disadvantages: € They¹re not first-class official Apple Computer products, and have not been formally tested. I do some testing on each release, and these libraries are being used in various projects at Apple (including AppleScript) and by third parties. On the whole they¹ve been very reliable. € They don¹t provide all the functionality and flexibility of the Apple Event Manager. For instance, AEStream doesn¹t support random access. € They¹re not as robust when given bad input. For instance, unlike the AEM they don¹t check for or disallow duplicate keywords in records. Version History 1.4.1 ‹ 6/28/95 ‹ Updated CodeWarrior libs for CW6 (ANSI lib is incompatible with CW5.) Removed shared library, added static CW6 PPC library. Removed compatibility warning. 1.4 ‹ 3/20/95 ‹ By popular demand, AESubDescs can now be used on complete Apple events. Added AECopySubDescData. Miscellaneous bug fixes and documentation improvements. 1.3.4 ‹ 6/1/94 ‹ Now includes libraries for Metrowerks CodeWarrior, and native PowerPC libraries. No other changes. 1.3.3 ‹ 10/93 ‹ Restored floating-point formatting to AEPrint. 1.3.2 ‹ 9/29/93 ‹ AESubDescToDesc now works properly when the wantType is typeWildCard. (This used to result in an error.) AEPrint no longer uses the library. Added -model far versions of the MPW libraries. 1.3.1 ‹ 7/7/93 ‹ Streams consisting of only a single simple (non-nested) descriptor are no longer incorrectly padded. ‹Jens Alfke Apple Computer AppleLink: JENS Internet: Jens_Alfke@powertalk.apple.com