background image
C H A P T E R 4
NewtApp Applications
4-36
Summary of the NewtApp Framework
newtTextView
4
editableTextView
:= {// This is the editable text view
_proto: newtTextView,
path: 'pathExpr,// Text stored/retrieved from here
styles: nil,// Plain text.
tabs: nil,// Tabs not enabled.
jamSlot: 'jamPathExpr,// New path for JamFromEntry.
TextScript: // Returns a text representation of data
func()..., //
JamFromEntry: // Retargets to
jamPathExpr
if not nil
func(
jamPathExpr
)..., //
}
newtRONumView
4
readOnlyNumberView
:= {// Read-only number view
_proto: newtRONumView,
path: 'pathExpr,// Numbers stored/retrieved from here
format: %.10g,// For 10-place decimal; you may change
integerOnly: true,// Text to num conversion is int
TextScript: // Returns a text representation of data
func()..., //
JamFromEntry: // Retargets to
jamPathExpr
if not nil
func(
jamPathExpr
)..., //
}
newtNumView
4
editableNumberView
:= {// Editable number view
_proto: newtNumView,
path: 'pathExpr,// Numbers stored/retrieved from here
format: %.10g,// For 10-place decimal; you may change
integerOnly: true,// Text to num conversion is int
TextScript: // Returns a text representation of data
func()..., //
JamFromEntry: // Retargets to
jamPathExpr
if not nil
func(
jamPathExpr
)..., //
}
newtROTextDateView
4
readOnlyTextDateView
:= {// Read-only text and date view. One
_proto: newtROTextDateView, //format slot must be non-nil
path: 'pathExpr,// Data stored/retrieved from here
© 2007-2024, o7 studio » при воспроизведении материала сайта ссылка обязательна