MacApp itself uses the mixin classes MScriptableObject and MDefaultScriptableObject to help make other classes scriptable, and it uses the MMailable and MMailing classes to provide PowerTalk mailer support. Note Multiple inheritance should be used carefully. Suppose you define a class, T YourShape , that does not have its own Draw method, but that mixes in two classes, TPrimitiveShape and TSimpleShape , both of which do have a Draw method. If your class calls the Draw method, the compiler will complain about the ambiguous use of the Draw method. Problems like this tend to occur in large projects, where many programmers contribute to the code base.
Design reviews can be an effective countermeasure.
If you don't need to do any of these things with a class, you don't need to set up RTTI for the class. The following sections describe how MacApp implements RTTI support and how you add RTTI information to your classes. The ClassDesc class works together with MacApp's RTTI macros to provide RTTI support. The ClassDesc class contains static global fields that point to sorted dynamic arrays of class name and inheritance data. It also contains methods for accessing the stored data.