background image
C H A P T E R 2 2
Transport Interface
Using the Transport Interface
22-25
The
vBarber
subtype shows a barber pole-like image, but it doesn't animate
automatically. To make it appear to move, use the
UpdateIndicator
method in
a
ViewIdleScript
method, as shown here:
// create the initial vBarber status view
:SetStatusDialog('Sending, 'vBarber, {statusText: "Sending data
set...", titleText:"Data set 1", barber:true});
...
// set up the status view data frame
statusDialog.barberValueFrame:={name:'vBarber,values:{barber:true}};
...
// set up the idle script
statusDialog.ViewIdleScript:= func()
begin
:UpdateIndicator(barberValueFrame); // spin the barber
return 500; // idle for 0.5 seconds
end;
...
// start the idler
statusDialog:Setupidle(500);
If the
autoStatus
slot of the transport preferences frame is
true
, the status
view closes automatically when you send the
SetStatusDialog
message with
'idle
as the first parameter.
You can force the status view to close manually by sending the transport the
message
CloseStatusDialog
. However, the next time you send the message
SetStatusDialog
with a state other than
'idle
as the first parameter, the
dialog reopens.
Providing a Routing Information Template
22
When viewing an item in the In/Out Box, the user can tap the transport icon to the
left of the item title to display a view that gives routing information about the item.
For example, for a fax item, the fax phone number is displayed; for a mail item, the
e-mail header is shown. Figure 22-2 (page 22-26) shows an example of a routing
information view.
You should create a template for a routing information view for your transport,
using
protoTransportHeader
. If you don't specify a header view, your
transport uses the default view, which displays the item title, the transport icon and
name, and the item's size in the In/Out Box soup (the first three elements in the
picture above).
© 2007-2024, o7 studio » при воспроизведении материала сайта ссылка обязательна