beautypg.com

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

Page 795

background image

C H A P T E R 2 2

Transport Interface

Using the Transport Interface

22-7

The default setting of the

addressingClass

slot is the symbol

'|nameRef.email|

For more information about how to use name references for addressing information,
see the section “Creating a Name Reference” beginning on page 21-27. For more
on name references in general, see “Name References” (page 5-1) in Newton
Programmer’s Reference
.

Grouping Transports

22

Two or more transports can be grouped together in the Action picker under a single
action. For example, there might be several different e-mail transports grouped
together under the single action “Mail.” The user selects a particular e-mail
transport from a picker supplied by the system in the routing slip, if there are
multiple transports registered for that group. (The picker doesn’t appear if there is
only one installed transport in the group.)

Each group of transports is identified by a common symbol, called the group
symbol. You indicate that your transport should be a member of a group by
specifying its group symbol in the

group

slot, its title in the

groupTitle

slot,

and its icon in the

groupIcon

slot. All transports in the same group should

specify the same group icon. This icon is shown in the Action picker for that
transport group. The individual transport icon (specified in the

icon

slot) is shown

in the routing slip when the transport is selected from the transport group picker.

You can use the following built-in bitmaps in the

groupIcon

slot of your transport,

if it belongs to one of the predefined groups. Here are the magic pointer constants:

After the user chooses a particular transport in a group from the picker in the
routing slip, the system remembers the last choice and sets the routing slip to that
choice when the user later chooses the same routing action from the Action picker.
If the user changes the transport in the routing slip group picker, the system closes
and reopens the routing slip for the current target item, since the routing slip may
be different for a different transport.

Before the routing slip is closed, it is sent the

TransportChanged

message. This

allows the routing slip to take any necessary action such as alerting the user that
addressing information might be lost as a result of changing transports. If

TransportChanged

returns a non-

nil

value, the transport is not changed and

Group

Icon bitmap constant

'mail

ROM_RouteMailIcon

'print

ROM_RoutePrintIcon

'fax

ROM_RouteFaxIcon

'beam

ROM_RouteBeamIcon