Changeset 34 for trunk/Cocoa/Pester/Source/PSAlarm.m
- Timestamp:
- 10/29/02 22:20:58 (22 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Cocoa/Pester/Source/PSAlarm.m
r28 r34 8 8 9 9 #import "PSAlarm.h" 10 #import "PSAlert.h" 10 11 11 12 NSString * const PSAlarmTimerSetNotification = @"PSAlarmTimerSetNotification"; 12 13 NSString * const PSAlarmTimerExpiredNotification = @"PSAlarmTimerExpiredNotification"; 14 15 // XXX need to reset pending alarms after sleep, they "freeze" and never expire. 13 16 14 17 @implementation PSAlarm … … 22 25 [invalidMessage release]; invalidMessage = nil; 23 26 [timer invalidate]; [timer release]; timer = nil; 27 [alerts release]; alerts = nil; 24 28 [super dealloc]; 25 29 } … … 224 228 { 225 229 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]; 226 246 } 227 247
Note:
See TracChangeset
for help on using the changeset viewer.