CHAPTER 15
Filing
Using the Filing Service 15-11
■ Create a storesFilter slot in your application’s target view
■ Implement the FileThis and NewFilingFilter methods.
■ Add a filing button view and a folder tab view to your application.
■ Register a callback function with the folder change notification mechanism.
Optionally, you can
■ create a doCardRouting slot in your application’s base view
■ create a dontStartWithFolder slot in your target view
■ implement support for local or global folders only
■ customize the title text in your protoNewFolderTab view
■ provide a TitleClickScript method to customize the action your folder tab
view takes when the user taps its title text
The sections immediately following describe these tasks in detail.
Creating the Labels Slot 15
Each of your application’s soup entries must contain a labels slot. It is
recommended that you make this slot part of a default soup entry created by a
frame-constructor function you supply. (For information on the use of frame-
constructor functions, see “Programmer’s Overview” on page 11-25 in Chapter 11,
“Data Storage and Retrieval.”)
When the user files a soup entry, the system stores a value in its
labels slot.
Setting the value of the
labels slot is really the only “filing” that is done—the
entry still resides in the soup, but your
FileThis and NewFilingFilter
methods provide the user-interface illusion that the data has been put in a folder.
The
labels slot can store either a symbol or the value nil. If the value stored in
this slot is
nil, your FileThis method must treat the item as unfiled. If a symbol
is stored in this slot, your
FileThis method must test the value of this slot to
determine whether the entry should be displayed and then redraw the display
appropriately. Similarly, your
NewFilingFilter method tests the value of this
slot to determine whether to display the item when the filing filter changes.
Creating the appName Slot 15
You must create in your application’s base view an appName slot containing a
string that is the user-visible name of your application.
Comments to this Manuals