background image
C H A P T E R 5
Stationery
Stationery Summary
5-15
Stationery Summary
5
Data Structures
5
ViewDef Frame
5
myViewDef := {
_proto:
anyGenericView
,
type: 'editor, // could also be 'viewer or a custom type
symbol: 'default, // required; identifies the view
name:
string
, // required; name of viewDef
version:
integer
, // required; should match dataDef
viewDefHeight:
integer,
// required, except in card-style
MinimalBounds:
// returns the minimal enclosing
func(
entry
)..., // bounding box for data
SetupForm:
// called by ViewSetupFormScript;
func(
entry, entryView
)..., //
use to massage data
}
Protos
5
newtStationery
5
myDataDef := { // use to build a dataDef
_proto: newtStationery,
description:
string
,
,
// describes dataDef entries
height:
integer,
// required, except in card-style; should
// match viewDefHeight
icon:
resource
,
// optional; used in header & New menu
name:
string,
// required; appears in New button picker
symbol: kAppSymbol, // required unique symbol
superSymbol: aSymbol, // identifies "owning" application
version:
integer,
// required; should match viewDef's version
FillNewEntry:
// returns a modified entry
func(
newEntry
)...,
MakeNewEntry:
// used if FillNewEntry does not exist
func()...,
StringExtract:
// creates string description
func(
entry
,
nLines
)...,
TextScript:
// extracts data as text for routing
func(
fields
,
target
)...,
}
© 2007-2024, o7 studio » при воспроизведении материала сайта ссылка обязательна