Ignore:
Timestamp:
10/29/02 22:20:58 (20 years ago)
Author:
Nicholas Riley
Message:

Changes for Pester 1.1d1.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Cocoa/Pester/Source/PSAlarm.m

    r28 r34  
    88
    99#import "PSAlarm.h"
     10#import "PSAlert.h"
    1011
    1112NSString * const PSAlarmTimerSetNotification = @"PSAlarmTimerSetNotification";
    1213NSString * const PSAlarmTimerExpiredNotification = @"PSAlarmTimerExpiredNotification";
     14
     15// XXX need to reset pending alarms after sleep, they "freeze" and never expire.
    1316
    1417@implementation PSAlarm
     
    2225    [invalidMessage release]; invalidMessage = nil;
    2326    [timer invalidate]; [timer release]; timer = nil;
     27    [alerts release]; alerts = nil;
    2428    [super dealloc];
    2529}
     
    224228{
    225229    return [[self date] compare: [otherAlarm date]];
     230}
     231
     232- (void)addAlert:(PSAlert *)alert;
     233{
     234    if (alerts == nil) alerts = [[NSMutableArray alloc] initWithCapacity: 4];
     235    [alerts addObject: alert];
     236}
     237
     238- (void)removeAlerts;
     239{
     240    [alerts removeAllObjects];
     241}
     242
     243- (NSArray *)alerts;
     244{
     245    return [[alerts copy] autorelease];
    226246}
    227247
Note: See TracChangeset for help on using the changeset viewer.