Last change
on this file since 34 was 34, checked in by Nicholas Riley, 22 years ago |
Changes for Pester 1.1d1.
|
File size:
947 bytes
|
Rev | Line | |
---|
[34] | 1 | //
|
---|
| 2 | // PSAlarmAlertController.m
|
---|
| 3 | // Pester
|
---|
| 4 | //
|
---|
| 5 | // Created by Nicholas Riley on Sat Oct 26 2002.
|
---|
| 6 | // Copyright (c) 2002 Nicholas Riley. All rights reserved.
|
---|
| 7 | //
|
---|
| 8 |
|
---|
| 9 | #import "PSAlarmAlertController.h"
|
---|
| 10 |
|
---|
| 11 | NSString * const PSAlarmAlertStopNotification = @"PSAlarmAlertStopNotification";
|
---|
| 12 |
|
---|
| 13 | @implementation PSAlarmAlertController
|
---|
| 14 |
|
---|
| 15 | + (PSAlarmAlertController *)controllerWithTimerExpiredNotification:(NSNotification *)notification;
|
---|
| 16 | {
|
---|
| 17 | return [[[self alloc] initWithAlarm: [notification object]] autorelease];
|
---|
| 18 | }
|
---|
| 19 |
|
---|
| 20 | + (IBAction)stopAlerts:(id)sender;
|
---|
| 21 | {
|
---|
| 22 | [[NSNotificationCenter defaultCenter] postNotificationName: PSAlarmAlertStopNotification object: nil];
|
---|
| 23 | }
|
---|
| 24 |
|
---|
| 25 | - (id)initWithAlarm:(PSAlarm *)alarm;
|
---|
| 26 | {
|
---|
| 27 | if ( (self = [super init]) != nil) {
|
---|
| 28 | [NSApp activateIgnoringOtherApps: YES];
|
---|
| 29 | [[alarm alerts] makeObjectsPerformSelector: @selector(triggerForAlarm:)
|
---|
| 30 | withObject: alarm];
|
---|
| 31 | }
|
---|
| 32 | return self;
|
---|
| 33 | }
|
---|
| 34 |
|
---|
| 35 | @end
|
---|
Note:
See
TracBrowser
for help on using the repository browser.