background image
C H A P T E R 2 2
Transport Interface
Using the Transport Interface
22-33
Most transports can use the built-in name reference data and view definitions to
handle and display name references. For example, one place you might need to use
these is if you need to build a string representing the address or addresses chosen in
the
protoAddressPicker
. The
selected
slot of the
protoAddressPicker
contains an array of name references for the names selected by the user in the picker.
You can use the name reference data definition method
GetRoutingTitle
to
return a string representing all the selected addresses, truncated to the length you
specify. Alternately, you can use the transport method
GetNameText
to do the
same thing.
Providing a Preferences Template
22
Transport preferences are accessed and changed from the information button in the
In/Out Box. (The information button is the small button with an "i" in it.) Each
transport with a preferences view is listed in the information picker, as shown in
Figure 22-8.
Figure 22-8
Information picker and preferences view
To make a preferences view for a transport, create a template with a prototype of
protoTransportPrefs
. In your transport object, store a reference to your
preferences view template in the
preferencesForm
slot. When the information
picker is displayed, it automatically includes an item for each transport that has a
preferences template registered in the transport's
preferencesForm
slot.
Each transport may add its own preferences view for configuring any options that
apply to that transport. Some common options include
enable/disable logging
deferred/immediate send
enable/disable listening
Information picker
Preferences view
© 2007-2017, o7 studio » при воспроизведении материала сайта ссылка обязательна