Adding a New Editor to People in Names

Create viewDef

3. Create a new layout and draw within it a clView. Within the clView, draw a newtLabelInputLine.

Edit the following slots of the newtLabelInputLine:

path
kColorSlotSym

label
"Favorite Color"

labelCommands
["Red", "Green", "Blue"]

4. Add the following slots to the clView to make it a viewDef:

name
"Color"

symbol
kNameColorEditorViewDefSym

type
'editor

In addition to those slots, there are two others we need to provide. The first is a slot which ensures that this viewDef doesn't show up in the i/o Box. Just as the other viewDefs (e-mail and so on) don't appear in the Show picker of the i/o Box, our color one shouldn't either.

5. Add a protection slot to the clView:

protection
'private


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

Last modified: 1 DEC 1996