background image
C H A P T E R 2 1
Routing Interface
Using Routing
21-15
If your
GetTargetInfo
method returns a multiple-item target object by using the
function
CreateTargetCursor
, you can set the class of that target object to
'newtOverview
to enable this special behavior. You'd do this using code like this:
CreateTargetCursor('newtOverview, myItemArray);
There is a limitation to using the
'newtOverview
data class, which is that this
data class handles data types of
'view
,
'frame
, and
'text
only. If you want to
enable other data types, or restrict the data types to just a subset of these, you'll
need to create your own overview data class and register formats under that class.
Note that the overview-handling code discussed here is contained in
protoRoutingFormat
, so any format that you create can support this same
functionality. To use it, you must define a multiple-item data class and then register
formats under that data class.
Displaying an Auxiliary View
21
When the user chooses a format in the format picker, you may need to get
additional information from the user in the routing slip view. You can do this
by means of an auxiliary view template that you specify in the
auxForm
slot
of the routing format. If you specify a view template in this slot, when the format
is selected, this auxiliary view template is instantiated with the function
BuildContext
and is sent an
Open
message.
Figure 21-5 shows an example of the auxiliary view used with the built-in Memo
format for Note stationery in the Notes application. This view gets information to
be used for the Name and Subject fields of the memo header.
Figure 21-5
Auxiliary view example
If you need access to information about the item being routed, you can access the
fields
slot in the auxiliary view. The system sets the
fields
slot to the frame
that becomes the In/Out Box entry for the item being routed. For details on this
frame, see "Item Frame" (page 18-1) in Newton Programmer's Reference.
© 2007-2024, o7 studio » при воспроизведении материала сайта ссылка обязательна