Platforms to show: All Mac Windows Linux Cross-Platform

Back to CalEventMBS class.

CalEventMBS.endDate as date

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Calendar MBS MacFrameworks Plugin 7.7 ✅ Yes ❌ No ❌ No ❌ No Desktop only
The end date.
Example
Var e as CalEventMBS
msgbox e.endDate.longdate+" "+e.endDate.longtime

The client is responsible for making sure they never attempt to save an event with a start date that occurs after the endDate, or an endDate that occurs before the startDate. Calling saveEvent: on an improperly configured event will fail.
(Read and Write property)

CalEventMBS.isAllDay as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Calendar MBS MacFrameworks Plugin 7.7 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Whether this event is all day.

True for all day events.
(Read and Write property)

CalEventMBS.isDetached as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Calendar MBS MacFrameworks Plugin 7.7 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Whether this event is detached.

These properties are only meaningful for CalEvents which are instances of a repeating event.

If this CalEvent is an instance of a repeating event, and an attribute of this CalEvent has been changed to from the default value generated by the repeating event, isDetached will return true. If the CalEvent is unchanged from its default state, or is not a repeating event, isDetached returns false.
(Read only property)

CalEventMBS.location as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Calendar MBS MacFrameworks Plugin 7.7 ✅ Yes ❌ No ❌ No ❌ No Desktop only
The location of this event.
Example
Var c as new CalCalendarStoreMBS

// set the date range where we look for event
Var sd as new date(2016,6,7,0,0,0)
Var ed as new date(2016,6,7,23,59,59)

// look for an event on that date
Var a() as CalEventMBS = c.events(sd,ed, c.calendars)
Var e as CalEventMBS = a(1)

// show location
MsgBox e.location

// change it
e.location = "Hamburg"

// check again
MsgBox e.location

// Save
Var error as NSErrorMBS
Var ok as Boolean = c.saveEvent(e, c.CalSpanThisEvent, error)

if ok then
MsgBox "OK"
elseif error <> nil then
MsgBox error.LocalizedDescription
else
MsgBox "Failed."
end if

(Read and Write property)

CalEventMBS.occurrence as date

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Calendar MBS MacFrameworks Plugin 7.7 ✅ Yes ❌ No ❌ No ❌ No Desktop only
The ocurrences of this event.

These properties are only meaningful for CalEvents which are instances of a repeating event.

Returns the occurrence date of a CalEvent. Since all instances of a repeating event have the same UID, we need another way to differentiate between those CalEvents. This method returns the NSDate on which this event was originally scheduled to occur. This value will remain the same even if the event has been detached and its start date has changed. For CalEvents not part of a repeating pattern, this method will return the same value as startDate.
(Read only property)

CalEventMBS.recurrenceRule as CalRecurrenceRuleMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Calendar MBS MacFrameworks Plugin 8.4 ✅ Yes ❌ No ❌ No ❌ No Desktop only
The recurrence rule for this event.
Example
// create a recurrence event:

Var c as new CalCalendarStoreMBS
Var e as new CalEventMBS
Var error as NSErrorMBS
Var s as string
Var ed as new date
Var rule as CalRecurrenceRuleMBS
Var rend as CalRecurrenceEndMBS

ed.day=21
ed.Month=7
ed.Year=2008

e.endDate=ed

Var sd as new date

sd.day=18
sd.Month=7
sd.Year=2008

e.startDate=sd
e.isAllDay=true
e.location="Example Location"

rule=CalRecurrenceRuleMBS.initYearlyRecurrence(1,nil)

Var calendars() as CalCalendarMBS = c.calendars
e.Title="Example Title"
e.calendar=calendars(0) // pick first calendar
e.notes="Example Notes"
e.URL="http://www.monkeybreadsoftware.de"
e.recurrenceRule=rule


if c.saveEvent(e, c.CalSpanAllEvents, error) then
if error<>Nil then s=error.localizedDescription
MsgBox "OK"+EndOfLine+s
else
if error<>Nil then s=error.localizedDescription
MsgBox "Failed"+EndOfLine+s
end if

Set to nil to remove recurrence rule.
(Read and Write property)

CalEventMBS.startDate as date

Type Topic Plugin Version macOS Windows Linux iOS Targets
property Calendar MBS MacFrameworks Plugin 7.7 ✅ Yes ❌ No ❌ No ❌ No Desktop only
The start date.
Example
Var e as CalEventMBS
msgbox e.startDate.longdate+" "+e.startDate.longtime

The client is responsible for making sure they never attempt to save an event with a start date that occurs after the endDate, or an endDate that occurs before the startDate. Calling saveEvent: on an improperly configured event will fail.
(Read and Write property)

The items on this page are in the following plugins: MBS MacFrameworks Plugin.


The biggest plugin in space...