background image
C H A P T E R 2 1
Routing Interface
Using Routing
Registering to Receive Foreign Data
To receive data from a different application or from a non-Newton source, your
application must register its interest in such data with the In Box application
registry. To do this, use the
If your application is no longer interested in foreign data, or is being uninstalled,
you can unregister to receive foreign data by using the
Note that your application can register to receive data from a different application.
If you register a test function with
, and that test function returns
for a particular item, the Routing interface changes the value of the
slot in the item to be the value of the
slot in
your application.
Be careful not to intercept incoming items that should be destined for other
applications when using this feature. The In Box application registry overrides the
slot of the item. The system uses the
slot as well as the
application data class registry (
) to find applications to which an
incoming item can be put away. The application identified by the
is used as the default for the automatic put away feature (
) and for
the Put Away picker.
Filing Items That Are Put Away
When an item is put away by an application, by default it is filed in the same folder
on the receiving Newton as it was in on the sending Newton. This often makes it
difficult for users to find new items, since they may be put away in folders that are
undefined. To alleviate this problem, it is recommended that all incoming items be
put away unfiled, so that users can more easily find items and file them where they
want to. Incoming items should be put away unfiled even if the recipient has a
folder of the same name as the sender.
For most applications, you put away an item unfiled by setting the
slot to
. However, filing techniques vary, so
this may not work for all applications.
Viewing Items in the In/Out Box
When data is queued in the Out Box, or has been received in the In Box and not
automatically put away, the user can view the data directly in the In/Out Box.
When the user chooses to view an item in the In/Out Box by tapping the item, the
system looks for a view definition of the type
that is
registered for the class of that item.
Your application should register such view definitions with the system if you want
users to be able to view items from your application in the In/Out Box. If you do
© 2007-2017, o7 studio » при воспроизведении материала сайта ссылка обязательна