
The System Protos
Some Useful System Protos
You will use a handful of the available system protos quite often in a typical application. Here is a summary of some of the more common uses and some recommendations on which protos to use for particular jobs:
- Unchanging Text
- A protoStaticText provides read-only text. Your application can change the text if it wishes, but it is not directly editable by the user. Just as with any template, you can set the
vClickable
view flag to receive taps.
- User Text Entry
- Usually protoInputLine or protoLabelInputLine will suffice for most simple input areas. The protoRichInputLine and protoRichLabelInputLine allow ink text input, as well. When using NewtApp (see Chapter 10, NewtApp), you'll use a different version of these (newtLabelInputLine). You can make these protos longer than one line.
- Pickable Lists
- Use protoLabelPicker. If the user can edit the item selected in the list, then you should use protoLabelInputLine.
- Container Views
- Use clView in most cases, as it is more generic than anything in the plain-wrap section of the supermarket.
- Picture Views
- Use clPictureView; it has an
icon
slot to hold the picture.
- Buttons
- Use protoTextButton for text buttons and protoPictureButton for picture buttons.
- The Application View
- Use either protoApp or clView with a protoStatus. If you use clView
,
make sure to set the vApplication
bit in the viewFlags
slot and add a declareSelf
slot with the value 'self
. When using NewtApp (see Chapter 10, NewtApp), you'll use the newtApplication proto.
An online version of Programming for the Newton using Macintosh, 2nd ed. ©1996, 1994, Julie McKeehan and Neil Rhodes.
Last modified: 1 DEC 1996