Adding a New Kind of Data to the Notepad
InstallScript
and a RemoveScript
. Create a text file and add to it the following:
InstallScript := func(partFrame,removeFrame) begin local dataDefSym := EnsureInternal(kDataDefSym); RegDataDef(dataDefSym, GetLayout("TemperatureDataDef.t")); RegisterViewDef( GetLayout("TemperatureViewDefEditor.t"), dataDefSym); end; RemoveScript := func(removeFrame) begin UnRegisterViewDef(kEditorViewDefSym, kDataDefSym); UnRegDataDef(kDataDefSym); endSave the file as "Install and Remove" and add it to the 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