dataDef Slots
version
description
icon
FillNewEntry
func(e)
. A function called when a new soup entry is created. This function is called with e
, a frame which has application-specific slots in it. You're responsible for adding any stationery-specific slots. FillNewEntry
should return the filled-in frame. Here is an example: func(e)
begin
e.(kDataDefSym).name := "Joe";
e.(kDataDefSym).age := 20;
return e;
end;
StringExtract
func(e, nLines)
. A function called to return a short textual description of e
(for example, the text in the overview, the title in the In/Out box, or the text in the Find overview). nLines
is the maximum number of lines of description to return. Here is an example: func(e, nLines)
begin
local t := e.name;
if nLines>1 and e.age then
t := t && $\n &
NumberStr(e.age);
return t;
end;
TextScript
func(item, reserved)
. A function called to return the complete textual description of item.body
(for example, the text for sending Mail). item
is an item frame used by transports (see Newton Programmer's Guide: Communications for more details on item frames). reserved
is a parameter which is currently undocumented. This function should return a string. Here's an example: func(item, reserved)
begin
local e := item.body;
local t := "Name is" &&
e.name;
if e.age then
t := t &&"\nAge is "&&
NumberStr(e.age);
return t;
end;
An online version of Programming for the Newton using Macintosh, 2nd ed. ©1996, 1994, Julie McKeehan and Neil Rhodes.
Last modified: 1 DEC 1996