Apple Newton Utilities Guía de usuario Pagina 699

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 942
  • Tabla de contenidos
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 698
CHAPTER 19
Built-in Applications and System Data
To Do List 19-25
GetToDoItemsForThisDate returns an array of tasks. Tasks are elements of
the array stored in the
topics slot of a day’s soup entry. For the structure of these
frames, see “To Do List Soup Format” (page 16-77) in Newton Programmers
Reference. The following code example obtains today’s tasks:
todaysTasksArray := GetRoot().calendar:GetToDo():
GetToDoItemsForThisDate(time());
GetToDoEntry
returns an array of soup entries for a specific day. Since the To
Do List stores tasks in a soup entry for each day, this array will contain an element
for each store that has a task stored under that day. The following code example
obtains today’s soup entries:
todaysEntries := GetRoot().calendar:GetToDo():
GetToDoEntry(time(),nil);
Note
The GetToDoEntry method requires that the To Do
List be open.
GetToDoItemsForRange returns an array of frames for each day in the range
passed in. The following code example retrieves the tasks for the next seven days:
nextWeeksTasks := GetRoot().calendar:GetToDo():
GetToDoItemsForRange(time(), time() + 7*24*60);
There is also a To Do List method, NextToDoDate(date), which returns the
date of the next task on or after
date. This method can be useful in this context.
Checking-Off a Task 19
A tasks is marked as completed with the To Do List method SetDone. This
method requires the To Do List to be open; you can make sure the To Do List is
open by calling the Dates method
DisplayDate. The following code sample
marks off a task:
//open Dates and make it show today’s To Do List
GetRoot().calendar:Open();
GetRoot().calendar:DisplayDate(time(),'toDoList);
//get a reference to today’s tasks
todaysTasksArray := GetRoot().calendar:GetToDo():
GetToDoItemsForThisDate(time());
//find a task that says "test"
for i := 0 to length(todaysTasksArray) - 1 do
if StrEqual (todaysTasksArray[i].text, "test") then
Vista de pagina 698
1 2 ... 694 695 696 697 698 699 700 701 702 703 704 ... 941 942

Comentarios a estos manuales

Sin comentarios