View Attributes

What's in a View

A view, as we said in Chapter 1, Introduction, is based upon a template that you create in NTK. This template is just a NewtonScript frame that you can modify using NTK's graphical template editor. Among the slots that this template contains are slots that govern the standard appearance and behaviors of a view.

Four of these slots are a part of all templates. These are viewBounds, viewClass, viewFlags, and viewFormat. In certain cases, however, these slots do not appear in the slot editor (see FIGURE 5.1). For instance, when you create a template based on a system proto, the system proto may already have those slots filled with predefined values. Thus, when you create a template, you inherit those values. In fact, if you add a slot to the template (like viewFlags), you are overriding the template's inherited slot values (see FIGURE 5.2).

FIGURE 5.1 : A template with inherited common slots.


FIGURE 5.2 : A template with a new slot that overrides the original.


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

Last modified: 1 DEC 1996