background image
C H A P T E R 1 9
Built-in Applications and System Data
Dates
19-19
Examples of Creating New Meeting Types
19
The following example code registers a new meeting type for a monthly meeting:
GetRoot().calendar:RegMeetingType (
'|MonthlyMeeting:MySig|,
{
item: "Monthly Meeting",
icon: myIcon,
smallicon: mySmallIcon,
NewMeeting: func(date, parentBox)
begin
local appt:= GetRoot().calendar
:AddAppointment ("",date, 60,
'monthly, nil);
appt.meetingType:=
'|MonthlyMeeting:MySig|;
EntryChange(appt);
appt; // the calendar will open the
// default meeting slip if we
// return the new appointment
end,
});
To register a new meeting type for a monthly event with a custom meeting slip:
GetRoot().calendar:RegMeetingType (
'|Monthly Event:MySig|,
{
item: "Monthly Event",
icon: myIcon,
smallicon: mySmallIcon,
NewMeeting: func(date, parentBox)
begin
local appt := GetRoot().calendar
:AddEvent("", date, 'monthly, nil);
appt.meetingType := '|MonthlyEvent:MySig|;
EntryChange(appt);
:OpenMeeting(appt,date,cal:GlobalBox());
nil;
// tells calendar not to open
// default meeting slip
end,
OpenMeeting: func(meeting, date, parentBox)
begin
local cal := GetRoot().calendar;
© 2007-2024, o7 studio » при воспроизведении материала сайта ссылка обязательна