C H A P T E R 1 1
Data Storage and Retrieval
11-68
Summary of Data Storage
Summary of Data Storage
11
This section summarizes data structures, functions, objects and methods used for
data storage on Newton devices.
Data Structures
11
Soup Definition Frame
11
mySoupDef :=
{
// string that identifies this soup to the system
name: "
appName
:
appSym
",
// string that is user visible name
userName: "My Application soup",
// application symbol
ownerApp: '|myApp:mySig|,
// user-visible name of app that owns this soup
ownerAppName: "My Application",
// user-visible string describing soup
userDescr: "This soup is used by
My Application.",
// array of indexSpecs - default indexes
indexes: [
anIndexSpec
,
anotherIndexSpec
]
// optional function used to initialize the soup
initHook:
symbolOrCallBackFn
}
Single-Slot Index Specification Frame
11
{
// must use this value - index keys are slot values
structure:'slot,
// entries indexed on this slot
path:
pathExpr
,
// data type found in the indexed slot
type:
symbol
,
// optional. 'ascending or 'descending
order:
symbol
,
// optional. pass 1 to use alternate sort table
sortID: nil
}