background image
C H A P T E R 2 1
Routing Interface
Using Routing
21-35
not provide a view definition, and there are no other view definitions available for
that data class, the In/Out Box displays a generic blank view for the item. Items
formatted with the
'view
data type do not need a separate view definition because
the In/Out Box itself provides a page preview view for these items.
Of the view definitions registered by your application, you can identify which
should be made available to the In/Out Box and which should be hidden from the
In/Out Box, by setting the
protection
slot in the view definition. Set the
protection
slot to
'public
to make the view definition available to the In/Out
Box. Set the
protection
slot to
'private
to hide the view definition from the
In/Out Box.
If more than one view definition is available to the In/Out Box for viewing an item,
the In/Out Box lets the user choose which view they want to see.
Note that view definitions for In Box items are opened by the In Box in a read-only
state. That is, if the view definition is of the type
'editor
, the user won't be able
to edit existing fields or write in new information. In other words, all child views
based on the
clParagraphView
class are read-only. However, views can receive
and respond to taps; that is,
ViewClickScript
messages are sent. If you want to
prevent your view definition from receiving all pen input, you can place a transparent
view of the
clView
class over the top of it to catch any taps.
Out Box items are opened in a writable state, if they are normally writable; that is,
the Out Box does nothing special to prevent editing if the view is editable. You may
want to make your out box items writable or not, depending on whether or not you
want the user to be able to change them in the out box.
You can use the
newtEntryView
method
EntryCool
to test if an item in the
In/Out Box is writable or not. This method returns
nil
for all In Box items, since
they are read-only.
Note also that application view definitions used in the In/Out Box must not expect
data defined within the context of the application.
For more information about writing and registering view definitions, refer to
Chapter 5, "Stationery." Note that the In/Out Box does not need data definitions,
only view definitions.
View Definition Slots
21
View definitions to be used by the In/Out Box have other slots of interest besides
the
target
slot.
One other slot of interest is named
fields
. When the view is open, the
fields
slot contains a reference to the In/Out Box entry. If the entry has a
body
slot and
the
body
slot contains a frame with a
class
slot, then the In/Out Box sets
target
to the
body
slot of the entry. This allows view definitions written for your
application to be used by the In/Out Box without modification. If you need to
© 2007-2024, o7 studio » при воспроизведении материала сайта ссылка обязательна