Adding a New Kind of Data to the Notepad

Create the dataDef

4. Next, we need to create a dataDef. Create a new layout file and draw a newtStationery.

5. Remove the viewBounds slot (since there will be no view associated with this dataDef). Remove the icon slot (or, if you are feeling adventurous, create an appropriate picture and set the icon slot appropriately). Set the remaining slots to:

symbol
kDataDefSym

superSymbol
'notes

name
"Temperature"

We haven't set any optional slots because it's interesting to see how well things work with only the required slots. We'll add optional slots in "Enhance the dataDef" on page 340.

6. Save the layout file as "TemperatureDataDef.t" and add it to your project.


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

Last modified: 1 DEC 1996