source: releases/Pester/1.1a2/Source/PSAlarm.h@ 215

Last change on this file since 215 was 43, checked in by Nicholas Riley, 22 years ago

Pester 1.1a1.

English.lproj/InfoPlist.strings: Updated for 1.1a1.

English.lproj/MainMenu.nib: Placeholder for day names in popup menu, fixed up by code (this means you can still edit it from IB though). Added command-shift-T to both in/at cells (required, code removes one or the other as appropriate). Fixed up sizes of fields. Default to today (this will need fixing when we localized the word "today", but it's fine for now...).

English.lproj/Notifier.nib: Remove date formatter because we set a string directly now instead (could set formatter from code, but we don't).

NJRDateFormatter: many workarounds for Cocoa bugs: missing AM/PM, incorrect results with space before AM/PM, etc. Added class methods to do format manipulation and return localized formats which work for output (though not always for input; this class has an internal workaround for the AM/PM problem).

NJRFSObjectSelector: properly handle enabled attribute, store internally and report externally as appropriate. Previously, the button would become enabled if you dropped something on it even if it was supposed to be disabled.

NJRQTMediaPopUpButton: stop sound preview when button disabled.

NJRVoicePopUpButton: stop voice preview when button disabled.

PSAlarm: new method -dateString returns long date string. Maintain local copy of long date, short date and time formats, and locale, using NJRDateFormatter.

PSAlarmNotifierController: update to use -[PSAlarm dateString], -[PSAlarm timeString] for localization instead of using broken formatter.

PSAlarmSetController: update documentation for some more Cocoa bugs I need to file. Set time of day and date formatters with localized date formats from NJRDateFormatter (retain/release issue here?) Localize weekday popup for predefined dates. Localize static date display with NJRDateFormatter. Note a solution (thanks to Douglas Davidson) for figuring out which control is editing. Added command-shift-T key equivalent to toggle in/at. Properly work around bugs witih soundRepetitionCount flashing, except where it's impossible to do anything else.

Read Me.rtfd: Updated for 1.1a1.

VERSION: Updated for 1.1a1.

File size: 1.3 KB
Line 
1//
2// PSAlarm.h
3// Pester
4//
5// Created by Nicholas Riley on Wed Oct 09 2002.
6// Copyright (c) 2002 Nicholas Riley. All rights reserved.
7//
8
9#import <Foundation/Foundation.h>
10
11typedef enum {
12 PSAlarmInvalid, PSAlarmInterval, PSAlarmDate, PSAlarmSet
13} PSAlarmType;
14
15extern NSString * const PSAlarmTimerSetNotification;
16extern NSString * const PSAlarmTimerExpiredNotification;
17
18// XXX figure out how to support reading old alarms
19
20@class PSAlert;
21
22@interface PSAlarm : NSObject <NSCoding> {
23 PSAlarmType alarmType;
24 NSCalendarDate *alarmDate;
25 NSTimeInterval alarmInterval;
26 NSString *alarmMessage;
27 NSString *invalidMessage;
28 NSTimer *timer;
29 NSMutableArray *alerts;
30}
31
32- (void)setInterval:(NSTimeInterval)anInterval;
33- (void)setForDateAtTime:(NSCalendarDate *)dateTime;
34- (void)setForDate:(NSDate *)date atTime:(NSDate *)time;
35- (void)setMessage:(NSString *)aMessage;
36- (void)addAlert:(PSAlert *)alert;
37- (void)removeAlerts;
38
39- (NSCalendarDate *)date;
40- (NSTimeInterval)interval;
41- (NSString *)message;
42- (NSArray *)alerts;
43
44- (NSString *)dateString;
45- (NSString *)shortDateString;
46- (NSString *)timeString;
47- (NSString *)timeRemainingString;
48
49- (BOOL)isValid;
50- (NSString *)invalidMessage;
51
52- (NSComparisonResult)compare:(PSAlarm *)otherAlarm;
53
54- (BOOL)setTimer;
55- (void)cancel;
56
57@end
Note: See TracBrowser for help on using the repository browser.