Apple Newton Utilities User's Guide Page 688

  • Download
  • Add to my manuals
  • Print
  • Page
    / 942
  • Table of contents
  • BOOKMARKS
  • Rated. / 5. Based on customer reviews
Page view 687
CHAPTER 19
Built-in Applications and System Data
19-14 Dates
[StringToDate("6/1/95 12:00am"),
StringToDate ("6/30/95 11:59pm")],
nil,
nil);
To nd the unique meeting in the month of June with the word “lunch” in the
title or the notes, and handle the possibility of an exception being thrown if this
criterion is not unique:
try
GetRoot().calendar:FindExactlyOneAppointment
(nil,
'["lunch"],
[StringToDate("6/1/95 12:00am"),
StringToDate("6/30/95 11:59pm")],
nil);
onexception |evt.ex| do
if CurrentException().data.errorCode = -48418
then //handle this case
else Rethrow()
The Dates application also provides a method, FindNextMeeting, which returns
an array with the meeting start date and duration, for the rst meeting after a
specied time. The
FindNextMeeting method is thus particularly useful for
nding an open time slot in the user’s schedule.
Here is an example, which nds the next meeting after 2 P. M . on November 1, 1996:
GetRoot().calendar:FindNextMeeting
(StringToDate("11/1/96 2pm"));
Moving Meetings and Events 19
To move an appointment programmatically you employ the MoveAppointment
method.
Here is an example; note that the parameters to MoveAppointment are:
(mtgText,mtgStartDate,newStartDate,newDuration).
GetRoot().calendar:MoveAppointment(
"Job Review",
StringToDate("9/1/96 9:30am"),
StringToDate("9/8/96 4:00pm"),
nil //do not change duration
);
Page view 687
1 2 ... 683 684 685 686 687 688 689 690 691 692 693 ... 941 942

Comments to this Manuals

No comments