Apple Newton Utilities Guide de l'utilisateur Page 698

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 942
  • Table des matières
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 697
CHAPTER 19
Built-in Applications and System Data
19-24 To Do List
Also, note that some of these methods only work when the To Do List is open. You
can ensure the To Do List is open by calling the Dates method
DisplayDate
passing in
'toDoList for the format parameter as in the following code:
//open Dates and make it show today’s To Do List
GetRoot().calendar:Open();
GetRoot().calendar:DisplayDate(time(),'toDoList);
This section describes
creating and removing To Do tasks
accessing tasks
checking-off tasks
using miscellaneous To Do List methods
using the To Do List soup
Creating and Removing Tasks 19
There are two To Do List methods that add a task: CreateToDoItem and
CreateToDoItemAll. The CreateToDoItem method takes four parameters, as
in
CreateToDoItem(date,richString,reminder,frequency). The
CreateToDoItemAll method takes two additional parameters, priority and
completed, which set the priority and completion status of the new task.
The following code example adds a task to today’s To Do List:
GetRoot().calendar:GetToDo():CreateToDoItem (time(),
"test", nil, nil);
The To Do List GetToDoEntry method (discussed in “Accessing Tasks” beginning
on page 19-24) will also create a soup entry if one does not exist for that date.
To remove tasks, use the To Do List method
RemoveOldToDoItems, which
removes either all or those tasks that have been marked-off before a specic date.
The following code sample removes all the nonrepeating To Do List tasks in the
twentieth century:
GetRoot().calendar:GetToDo():
RemoveOldToDoItems(StringToDate("1/1/2000"),'all,nil);
Accessing Tasks 19
The To Do List provides three methods for accessing tasks:
GetToDoItemsForThisDate
GetToDoEntry
GetToDoItemsForRange.
Vue de la page 697
1 2 ... 693 694 695 696 697 698 699 700 701 702 703 ... 941 942

Commentaires sur ces manuels

Pas de commentaire