Inheritance in NewtonScript

Summary

This chapter covered NewtonScript's unique form of inheritance. You learned that this inheritance is by difference: objects only store what is different from the object they inherit from. Next, we covered the two forms of inheritance: proto inheritance and parent inheritance. We also did a detailed walkthrough of assignment and inheritance lookup rules. You should now have a clear idea of how assignment and slot access work in NewtonScript. We then covered some of the uses of self and how to send messages to your parent. Last of all we looked at the relationship among inheritance, the Newton, NTK, and protos.

We concluded the chapter with several exercises that should give you a clear idea of how inheritance works within an actual Newton application.


An online version of Programming for the Newton using Macintosh, 2nd ed. ©1996, 1994, Julie McKeehan and Neil Rhodes.

Last modified: 1 DEC 1996