set eventAsStr to "{ "
# The toString handler above will output a string representation
# of the event but we'll only get class object names for the
# record keys. For debugging, it's better to manually build the
# string version of the Calendar Event.
tell application "Calendar"
if exists summary of sourceEvent then
set eventAsStr to eventAsStr & "summary:\"" & my toString(summary of sourceEvent) & "\""
end if
if exists description of sourceEvent then
set eventAsStr to eventAsStr & " , description:\"" & my toString(description of sourceEvent) & "\""
end if
if exists location of sourceEvent then
set eventAsStr to eventAsStr & ", location:\"" & my toString(location of sourceEvent) & "\""
end if
if exists url of sourceEvent then
set eventAsStr to eventAsStr & ", url:\"" & my toString(url of sourceEvent) & "\""
end if
if exists (start date of sourceEvent) then
set eventAsStr to eventAsStr & ", start date:" & my toString(start date of sourceEvent)
end if
if exists (end date of sourceEvent) then
set eventAsStr to eventAsStr & ", end date:" & my toString(end date of sourceEvent)
end if
if exists (allday event of sourceEvent) then
set eventAsStr to eventAsStr & ", allday event:" & my toString(allday event of sourceEvent)
end if
if exists recurrence of sourceEvent then
set eventAsStr to eventAsStr & ", recurrence:\"" & my toString(recurrence of sourceEvent) & "\""
end if
if exists (excluded dates of sourceEvent) then
set eventAsStr to eventAsStr & ", excluded dates:" & my toString(excluded dates of sourceEvent)
end if
if exists status of sourceEvent then
set eventAsStr to eventAsStr & ", status:" & my toString(status of sourceEvent)
end if
end tell
set eventAsStr to eventAsStr & " }"