
Introduction to Protos
_proto slot to it that contains a pointer to the system or user proto it is based upon. At run time, the view that is created from the template inherits all of the proto's slots. These slots contain data values and/or methods from the proto via this pointer.

FIGURE 7.1 : Creating a view based upon a template based upon a proto.

FIGURE 7.2 : A template based on a proto contains an _proto slot pointing to the proto.
_proto slot contains a reference to protoTextButton, the proto upon which it is based. You could also portray this same template in standard NewtonScript:
MyTextButton := {
buttonClickScript: ...,
text: "Button",
viewBounds: ...,
_proto: protoTextButton
}
An online version of Programming for the Newton using Macintosh, 2nd ed. ©1996, 1994, Julie McKeehan and Neil Rhodes.
Last modified: 1 DEC 1996