source: trunk/Cocoa/Pester/Source/PSAlarmNotifierController.m@ 21

Last change on this file since 21 was 21, checked in by Nicholas Riley, 20 years ago

Pester 1.0d1

File size: 862 bytes
Line 
1//
2// PSAlarmNotifierController.m
3// Pester
4//
5// Created by Nicholas Riley on Tue Oct 08 2002.
6// Copyright (c) 2002 Nicholas Riley. All rights reserved.
7//
8
9#import "PSAlarmNotifierController.h"
10
11
12@implementation PSAlarmNotifierController
13
14- (id)initWithTimer:(NSTimer *)timer;
15{
16 if ([self initWithWindowNibName: @"Notifier"]) {
17 NSString *message = [timer userInfo];
18
19 [[self window] center];
20 if (message == nil || [message isEqualToString: @""])
21 message = @"Alarm!";
22 [messageField setStringValue: message];
23 [dateField setObjectValue: [timer fireDate]];
24 [NSApp activateIgnoringOtherApps: YES];
25 [[self window] makeKeyAndOrderFront: nil];
26 [[self window] orderFrontRegardless];
27 NSBeep();
28 }
29 return self;
30}
31
32- (IBAction)close:(id)sender;
33{
34 [self close];
35}
36
37@end
Note: See TracBrowser for help on using the repository browser.