background image
C H A P T E R 1 9
Built-in Applications and System Data
Dates
19-13
To delete a single instance of the repeating event created in "Adding Meetings
or Events":
GetRoot().calendar:DeleteEvent ("George's birthday",
StringToDate("2/22/95"), true);
To delete the whole series of George's birthdays by passing in a meeting frame
for a repeating meeting:
GetRoot().calendar:DeleteEvent
( GetRoot().calendar:FindAppointment
("George's birthday",
nil,
StringToDate("2/22/95"),
'RepeatingEvent,
nil)
[0], //FindAppointment returns an array
nil,
// again, these two params. are ignored
nil);
The preferred way to delete the repeating event series is by calling
DeleteRepeatingEntry
:
GetRoot().calendar:DeleteRepeatingEntry
("George's birthday", StringToDate("2/22/95"), true);
Finding Meetings or Events
19
The Dates application provides two methods to find meetings or events in one of
the Dates soups:
FindAppointment
and
FindExactlyOneAppointment
.
The
FindAppointment
method takes the following parameters:
FindAppointment(
mtgText
,
findWords
,
dateRange
,
type
,
maxNumberToFind
)
. The
FindExactlyOneAppointment
method shares the
same first four parameters, but (not surprisingly) does not use a maxNumberToFind
parameter. The
FindExactlyOneAppointment
method functions exactly like
FindAppointment
, except that if more than one meeting or event fits the search
criteria, an exception (error ­48418) is thrown.
The following examples show how to find meetings with these two methods:
To find all meetings in the month of June 1995 with the word "lunch" in the title
or the notes:
GetRoot().calendar:FindAppointment
(nil,
'["lunch"],
© 2007-2024, o7 studio » при воспроизведении материала сайта ссылка обязательна