background image
C H A P T E R 2 1
Routing Interface
About Routing
21-5
3. Using the list of formats, the system builds a list of transports that can handle at
least one of the data types supported by any of the formats. The matching
transports are shown on the Action picker. Application-defined actions such as
delete or duplicate are also added to the picker.
4. If the user chooses a transport-based action from the picker, the system sends
the
SetupItem
message to the current (last-used) format for that transport and
the data type being routed. Then the routing slip is opened, where the user can
supply addressing information and confirm the routing action. If the user
switches formats from among those available, the
SetupItem
message is sent
to the new format.
5. If the user chooses an application-defined action from the picker, the system
sends the Action button view the message defined by the application for that
action (in the
RouteScript
slot of the
routeScripts
frame).
The following section describes routing formats in more detail and explains how
they're used to determine what transport-based routing actions appear on the
Action picker. The steps in this summary are explained in greater detail in the
section "Providing Transport-Based Routing Actions" beginning on page 21-9.
Routing Formats
21
To implement the sending of data using the Routing interface and a transport, an
application uses one or more routing formats that specify how data is to be formatted
when it is routed. A routing format is a frame specifying items such as the title of
the format, a unique identifying symbol, the type of data the format handles, and
other information controlling how the data is handled. Some types of routing
formats, such as print formats, are view templates that contain child views that lay
out the data being printed. Other types of routing formats, such as frame formats,
simply control how a frame of data is sent; these have no visual representation.
Here is an example of a routing format frame:
{_proto: protoPrintFormat,// based on this proto
title: "Two-column", // name of format
symbol: '|twoColumnFormat:SIG|, // format id
// construct child views that do the actual layout
ViewSetupChildrenScript: func() begin ... end,
// handle multiple pages
PrintNextPageScript: func() begin ... end,
...}
The
dataTypes
slot in the format indicates the types of data handled by the
format. This slot and the class of the data object being routed are used to determine
© 2007-2024, o7 studio » при воспроизведении материала сайта ссылка обязательна