| Inherits from | |
| Conforms to | |
| Framework | /System/Library/Frameworks/CalendarStore.framework |
| Availability | Available in Mac OS X v10.5 and later.
|
| Companion guide | |
| Declared in | CalAlarm.h |
The CalAlarm class represents alarm objects in iCal. Use the alarm class method to create an alarm and use the properties to set information about an alarm. Use the triggerDateRelativeTo: method if you need to know how much time is left before an alarm triggers. Use CalCalendarItem methods to add alarms to, or remove alarms from, events and tasks.
absoluteTrigger property
action property
emailAddress property
relativeTrigger property
sound property
URL property
For more about Objective-C properties, see “Properties” in The Objective-C 2.0 Programming Language.
The date and time to trigger the alarm.
@property(copy) NSDate *absoluteTrigger;
When you set the absoluteTrigger property, the relativeTrigger property is set to nil.
CalAlarm.hThe action to take when triggering the alarm.
@property(copy) NSString *action;
The value of this property is one of the constants described in “Alarm Actions”.
CalAlarm.hAn email address that is the recipient of an email alarm—an alarm that triggers an email message.
@property(copy) NSString *emailAddress;
When you set the emailAddress property, the action property is set to CalAlarmActionEmail, and the sound and URL properties are set to nil.
CalAlarm.hThe relative date and time to trigger the alarm.
@property(copy) NSTimeInterval relativeTrigger;
When you set the relativeTrigger property, the absoluteTrigger property is set to nil.
CalAlarm.hThe sound to play when the alarm triggers.
@property(copy) NSString *sound;
The value of this property is the name of a system sound that can be used with the soundNamed: class method to create an NSSound object. When you set the sound property, the action property is set to CalAlarmActionSound, and the emailAddress and URL properties are set to nil.
CalAlarm.hThe URL to open when the alarm triggers.
@property(copy) NSURL *url;
When you set the URL property, the action property is set to CalAlarmActionProcedure, and the emailAddress and sound properties are set to nil.
Creates and returns a new alarm object.
+ (id)alarm
Newly initialized CalAlarm object.
CalAlarm.hReturns a delta value between the specified date and the date that the alarm is scheduled to trigger.
- (NSDate *)triggerDateRelativeTo:(NSDate *)date
The start date that you want to compute the delta date from.
The delta value between date and the date the alarm triggers.
Use this method if you need to know precisely how long it will be before an alarm triggers. Alarms with relative triggers do not contain this information in the properties. Use this method to compute the delta value. For example, pass the current date and this method returns the time remaining until the alarm triggers.
CalAlarm.hThe action to take when an alarm triggers.
extern NSString * const CalAlarmActionDisplay; extern NSString * const CalAlarmActionEmail; extern NSString * const CalAlarmActionProcedure; extern NSString * const CalAlarmActionSound;
CalAlarmActionDisplayA message should be displayed when an alarm triggers.
Available in Mac OS X v10.5 and later.
Declared in CalAlarm.h
CalAlarmActionEmailAn email message should be sent when an alarm triggers.
Available in Mac OS X v10.5 and later.
Declared in CalAlarm.h
CalAlarmActionProcedureA file should be opened when an alarm triggers.
Available in Mac OS X v10.5 and later.
Declared in CalAlarm.h
CalAlarmActionSoundA sound should be played when an alarm triggers.
Available in Mac OS X v10.5 and later.
Declared in CalAlarm.h
CalendarStore/CalAlarm.h
Last updated: 2007-07-08