Retired Document
Important: This sample code may not represent best practices for current development. The project may use deprecated symbols and illustrate technologies and techniques that are no longer recommended.
2_First_Carbon/ReadMe.txt
ExamplePrefs 2.0 |
Step 2 in your Carbonizing project is the final Classic version of the program. The TARGET_API_MAC_XXX constants are manually defined in the prefix file in order to switch on which headers to include. OPAQUE_TOOLBOX_STRUCTS and ACCESSOR_CALLS_ARE_FUNCTIONS are defined true in the prefix as well. This means that Toolbox accessor functions are now used instead of directly accessing the various Toolbox structures and the Classic target links against CarbonAccessors.o. The exception is the IconListDef project. CarbonAccessors.o is 84K and the IconListDef resource file is 4K, so rather than increase the size of the resource by a factor of 20, the six accessor functions it uses are defined in its source. The upshot of using accessor functions everywhere is that far less of the code has to be conditionalized for Classic/Carbon. The window/list method continues to be more work than the dialog/list box control method, this time it's 624 (+58 from 1.0) lines to 323 (+44 from 1.0) lines. |
Copyright © 2006 Apple Computer, Inc. All Rights Reserved. Terms of Use | Privacy Policy | Updated: 2006-07-25