Inheritance in NewtonScript
_proto
that points to the object's proto. Let us revisit in FIGURE 4.2 our two sample objects to help clarify the relationship between an object (copyCat
) and its proto (original
). copyCat
now contains a _proto
slot. This slot still points to original
, which copyCat
inherits from and which now serves as its proto. We say that copyCat
protos from original
. The other mechanics of inheritance are still the same; all of original
's slots are available in copyCat
, except for text
, which is still an overridden data slot.
FIGURE 4.2 : One frame protoing from another.
An online version of Programming for the Newton using Macintosh, 2nd ed. ©1996, 1994, Julie McKeehan and Neil Rhodes.
Last modified: 1 DEC 1996