
CHAPTER 15
Filing
15-8 About Filing
on the internal store, the external store or both; that is, the user can specify a stores
filter in addition to a labels filter. Figure 15-8 shows the folder tab picker in a view
based on the
protoClockFolderTab proto.
Figure 15-8 Choosing a filing filter
To display items according to the user’s choice of store, your target view must
supply a
storesFilter slot. When the target view has a storesFilter slot
and more than one store is available, the folder tab views allow the user to specify a
store in addition to a folder from which data items are retrieved for display. For
example, the user might choose to display only entries in the
'business folder
on the internal store.
When the user chooses any filter from this picker, the system updates the
storesFilter or labelsFilter slot and sends the target view a
NewFilingFilter message. The argument passed to this method by the system
tells you what changed—the stores filter or the labels filter—but not its new value.
You must supply a
NewFilingFilter method that examines the
storesFilter or labelsFilter slot and queries your application’s soups
appropriately. If the value of the
labelsFilter slot is nil, your
NewFilingFilter method must display all target items. Similarly, if
the value of the target view’s
storesFilter slot is nil, your
NewFilingFilter method must display items on all available stores.
Your
NewFilingFilter method must also perform any other actions
necessary to display the appropriate data, such as redrawing views affected by
the new filter value.
You can use the
RegFolderChanged function to register your own callback
function to be executed when the user adds, deletes, or edits folder names. You
cannot respond adequately to these kinds of changes from within your
NewFilingFilter or FileThis methods alone.
Komentáře k této Příručce