beautypg.com

Summary of the newtapp framework 4, Required code 4, Protos 4 – Apple Newton Programmer’s Newton 2.0 (for Newton 2.0) User Manual

Page 163

background image

C H A P T E R 4

NewtApp Applications

Summary of the NewtApp Framework

4-25

Summary of the NewtApp Framework

4

Required Code

4

Required InstallScript

4

InstallScript := func(partFrame)

begin

partFrame.removeFrame := (partFrame.theForm):

NewtInstallScript(partFrame.theForm);

end;

Required RemoveScript

4

RemoveScript := func(partFrame)

begin

(partFrame.removeFrame):NewtRemoveScript(removeFrame);

end;

Protos

4

newtSoup

4

myNewtSoup := {

_proto: newtSoup, // NewtApp soup proto

soupName:

"MyApp:SIG"

, // a string unique to your app.

soupIndices: [

//soup particulars, may vary

{structure: '

slot

, //describing a slot

path: '

title

, // named “title” which

type: 'string}, //contains a string

...], // more descriptions may follow

soupQuery: {

// a soup query

type: 'index,

indexPath:'

timeStamp

}, // slot to use as index

soupDescr:"The

Widget

soup."//string describing the soup

defaultDataType:'

soupType

,

//type for your soup entry