beautypg.com

Apple Newton Programmer’s Newton 2.0 (for Newton 2.0) User Manual

Page 816

background image

C H A P T E R 2 2

Transport Interface

22-28

Using the Transport Interface

the item is updated. The format picker also sends the

SetupItem

message to the

format itself. If the format contains an

auxForm

slot, the view specified in the

auxForm

slot opens when the format is selected.

The sender pop-up child view allows the sender of the item to select a different
owner persona or worksite from a picker, which might affect how the owner’s name
and address appear and how the item is sent. For example, if you choose a worksite
location with a different area code from your company worksite, and send a fax to
your company, the system automatically inserts a “1” and the company area code
before the phone number, which it wouldn’t do if you told the system you were at a
location in that area code.

The default owner name (or persona as it is sometimes called) shown by this picker
is the one corresponding to the last-used owner name for a routing operation. The
default worksite for the owner is the one corresponding to the last worksite used for
a routing operation, or the setting of the home location in the Time Zones
application (whichever was done last). Note that additional owner names and
worksites can be created by users in the Owner Info application.

The Send button child in

protoFullRouteSlip

provides the button that

actually sends the item to the Out Box, and can also activate the transport. When
tapped, the button may display a picker with the choices “Now” and “Later,” or it
may immediately send the item now or later. Its operation depends on the user
preference setting of the

nowOrLater

slot in the preferences configuration frame

described in Table 19-1 (page 19-7) in Newton Programmer’s Reference, and on
the return value of the transport

ConnectionDetect

method, which can force

the button to send now or later without displaying a picker.

The Send button also handles submitting multiple items to the Out Box when the
user has selected many entries from an overview. If the user has selected multiple
items but the transport cannot handle cursors (the

allowBodyCursors

transport

slot is

nil

), the system sends the transport the

VerifyRoutingInfo

method.

This method allows the transport to modify the individual items, if necessary.
When only a single item (not a multiple-item target object) is submitted to the Out
Box,

VerifyRoutingInfo

is not called. In this case, if you need to modify the

item before it is sent, you can do this in the routing slip method

PrepareToSend

.

The function of the Send button is to submit the contents of the

fields

slot in the

routing slip to the Out Box. (The

fields

slot holds the item being routed and

other information about it.) After the item is submitted, the Out Box sends the
transport the

SendRequest

message to alert it that an item is waiting to be sent. If

the

cause

slot in the

request

argument to

SendRequest

is set to

'submit

, this

indicates the user chose to send the item later from the Send button. If the

cause

slot is

'item

, this indicates the user chose to send the item immediately.

Additionally, the

connect

slot in the item contains a Boolean value indicating if

the user chose to send the item now (

true

) or later (

nil

).