
CHAPTER 15
Filing
Using the Filing Service 15-15
declare your folder tab view to the application’s base view. The system sets the
folder tab view’s bounds for you at run time, positioning the folder tab relative to
its parent, near the top of the screen.
Customizing Folder Tab Views 15
The protoNewFolderTab proto supplies a child view named title that images
a string that you may supply optionally. To display your own string as the title text
in a
protoNewFolderTab view, use the global function SetValue to set the
value of the
text slot in the title view child of your folder tab view.
For example,
SetValue(myNewFolderTab.title, 'text, "My text");
▲
W ARNING
Do not create a title slot in any folder tab view. Do not replace
the title text in a
protoClockFolderTab view. ▲
Defining a TitleClickScript Method 15
The folder tab view’s TitleClickScript method is invoked when the user taps
the title text in a
protoNewFolderTab view or the time displayed as title text in
a
protoClockFolderTab view. The default TitleClickScript method
provided for
protoNewFolderTab views does nothing. The default
TitleClickScript method provided by the protoClockFolderTab view
displays the built-in Clock application.
You can provide your own
TitleClickScript method to customize the action
your folder tab views take when the user taps them.
Implementing the FileThis Method 15
When the user taps the File button in the Filing slip, the system sends the
FileThis message to the target view. Your FileThis method must perform any
actions necessary to file the target and redraw the current display appropriately.
For example, if your application is displaying an overview list of unfiled items
when it receives this message, your
FileThis method needs to redraw the list
without the newly filed item in it, providing the user-interface illusion that the item
has been moved.
Your
FileThis method must also handle the case in which the user re-files an
item in the category under which it already resides. In this case, the appropriate
response is to do nothing; unnecessarily redrawing views that have not changed
makes the screen appear to flicker or flash. Because the value of the target’s
labels slot does not change unless you change it, you can test this slot’s current
value to determine whether the new value is different.
Kommentare zu diesen Handbüchern