background image
C H A P T E R 1 9
Built-in Applications and System Data
Dates
19-17
// get the notes of the last meeting. If there are no
// meeting notes, GetMeetingNotes returns nil
meetingNotes := cal:GetMeetingNotes(mtgName, appDueDate);
// add a paragraph to these notes, then set the meeting
// notes to this new array. Note, how care is taken
// not to overwrite any existing notes.
newNote := {viewStationery
:
'para,
text
:
"Last Design Meeting",
viewBounds
:
SetBounds(5, 5, 10, 10)
};
//Bounds will be expanded
//by system
if meetingNotes then
begin
lowestBottom := 0;
foreach elem in meetingNotes do
if elem.viewBounds.bottom > lowestBottom then
lowestBottom := elem.viewBounds.bottom;
newNote.viewBounds.top := lowestBottom + 5;
newNote.viewBounds.bottom := lowestBottom + 50;
AddArraySlot(meetingNotes, newNote);
end;
else
meetingNotes := [newNote];
// Now add the new note array to the meeting
cal:SetMeetingNotes (mtgName,AppDueDate,meetingNotes);
// check if the icon is of type 'WeeklyMeeting
// if it isn't make it so
if NOT (cal:GetMeetingIconType( mtgName, startDate)
= 'WeeklyMeeting)
then cal:SetMeetingIconType(mtgName, startDate,
'WeeklyMeeting);
Creating a New Meeting Type
19
You can programmatically add new meeting types by calling the Dates method
RegMeetingType
. The meeting type will appear in the New picker in the Dates
status bar. The
RegMeetingType
method takes two parameters, a symbol
identifying the meeting type--which should include your developer signature--
© 2007-2024, o7 studio » при воспроизведении материала сайта ссылка обязательна