background image
C H A P T E R 2 1
Routing Interface
Using Routing
method should construct the view for the next page
of data so that the message
shows the view. Typically, you do this
by keeping track of what data has been routed so far. When the format receives this
message, you select a new set of child views representing the next page of data to
send. Then you call the view method
, which closes and then
reopens the child views. This method also causes the transport to send your print
format view the
message again.
Note that in the
method, you can also change the
content of child views on the current page. For example, you might want to change
the content of a text field. To do this, use the
function to pass in a new
value for the view content, like this:
SetValue(myParagraphView, 'text, newRichString);
When faxing, it's best not to perform lengthy operations in the
method, since the connection stays open between
pages. However, this is less time critical than the
method. If
possible, execute lengthy operations in the
method, which
is called just once before the connection is opened.
If you need to create any custom shapes to be drawn on the page by the
method, create the shapes in the
method. Alternatively, you can create shapes at compile time, if they are static.
Because of fax connection time-out issues, minimize shape creation in the
method, as shape creation takes too much time and the
connection might time out as a result.
Creating a Frame Format
You create a frame format by using
. This is the standard
format for routing objects with
data types, such as for beaming
and e-mail. To enable these types of transports for your data, you must register at least
one format based on this proto. Here is an example of a format based on this proto:
MyFrameFormat := {
_proto: protoFrameFormat,
symbol: '|myFrameFormat:SIG|,
title: "No comments",
SetupItem: func(item, targetInfoFrame) begin
local myData := clone(;
RemoveSlot(myData, 'comments); // remove some stuff
item.body := myData;
// this item.body is not a soup entry.
// if it MIGHT be a soup entry, call
// inherited:SetupItem(item, targetInfoFrame)
© 2007-2024, o7 studio » при воспроизведении материала сайта ссылка обязательна