C H A P T E R 1 9
Built-in Applications and System Data
19-26
To Do List
begin
theTask
:= todaysTasksArray[i];
theIndex := i;
end;
//and mark it as done
GetRoot().calendar:GetToDo():
SetDone(theIndex,theTask,true,nil,nil);
The third parameter to
SetDone
determines whether a task is checked off; passing
nil
unchecks it.
Miscellaneous To Do List Methods
19
The To Do List also provides the following methods:
GetTaskShapes
and
GetToDoShapes
return the shapes necessary to draw
tasks, which are used for printing.
LastVisibleTopic
returns the index in the
topics
array of the last
task drawn.
SetPriority
sets the priority of a task. (This method requires the To Do List
to be open.)
EnsureVisibleTopic
scrolls the To Do List as necessary to ensure that a
task is visible. (This method requires the To Do List to be open.)
Using the To Do List Soup
19
The To Do List stores its data in the "To Do List" soup. Entries in this soup are
frames for either a particular day, or for all repeating to do items.
In this soup, each day has a single entry that includes a
topics
slot, which is an
array of tasks for that day. All repeating tasks are saved in a single entry, with a
date
slot of 0.
If one day is represented by an entry on each of several stores of the soup--for
example, if there was one entry in internal store and one on a storage card--the To
Do List merges the entries for display purposes. The entries are not actually moved
from one store to another in this process.
For information about the structure of entries in this soup, see "To Do List Soup
Format" (page 16-77) in Newton Programmer's Reference. A list of these frames is
available in the Summary; see "To Do List Soup" (page 19-53).
To avoid future compatibility problems with soup format changes, you should use
the global functions
GetSysEntryData
and
SetSysEntryData
to get or
change entries in any of the built-in soups. They allow you to get and set the values