Ignore:
Timestamp:
03/10/03 05:48:21 (19 years ago)
Author:
Nicholas Riley
Message:

PSTimer.m: Fix bug 15, leaking PSTimer from NSInvocation argument retention.

Read Me.rtfd: Updated release notes.

PSAlarm.[hm]: Removed obsolete comment. Changed 1m-59m times to
display without `0h'. Moved code from deserialization to -resetTimer
to be used for alarm deletion undo - fix bug 14.

PSAlarmsController.m: Fix bug 14 - implement _restoreAlarms:,
_removeAlarms and _undoManager. Need to add localized string.

PSAlarmAlertController.m: Fix bug 17, move alert triggering from
constructor to -performAlertsForAlarm: to avoid nested notifications
delivering in wrong order.

PSAlarms.[hm]: Fix bug 14 - implement -restoreAlarms, invokes [PSAlarm
resetTimer]. Clarified a comment. Uncommented some debug logging.

package-Pester.sh: Implemented partition map-less disk image, saves a
few K on distribution. Removed obsolete comments. Added agvtool
bump.

File:
1 edited

Legend:

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

    r105 r113  
    7272{
    7373    PSAlarm *alarm = [notification object];
    74     // NSLog(@"timer expired: %@ retainCount %d", alarm, [alarm retainCount]);
     74    NSLog(@"timer expired: %@ retainCount %d", alarm, [alarm retainCount]);
    7575    [expiredAlarms addObject: alarm];
    76     // NSLog(@"expired alarms: %@", [expiredAlarms description]);
     76    NSLog(@"expired alarms: %@", [expiredAlarms description]);
    7777    [alarms removeObject: alarm];
    7878    [self _changed];
     
    8282{
    8383    PSAlarm *alarm = [notification object];
    84     // NSLog(@"timer set: %@ retainCount %d", alarm, [alarm retainCount]);
     84    NSLog(@"timer set: %@ retainCount %d", alarm, [alarm retainCount]);
    8585    [alarms addObject: alarm];
    8686    [expiredAlarms removeObject: alarm];
     
    210210}
    211211
     212- (void)restoreAlarms:(NSSet *)alarmsToRestore;
     213{
     214    [alarmsToRestore makeObjectsPerformSelector: @selector(resetTimer)];
     215}
     216
    212217- (BOOL)alarmsExpiring;
    213218{
     
    274279        e = [plExpiredAlarms objectEnumerator];
    275280        while ( (plAlarm = [e nextObject]) != nil) {
    276             // expired alarms may be just that, or they may have outstanding repeats - if the latter, PSAlarm will reschedule the alarm.
     281            // expired alarms may be ready for deletion, or may repeat - if the latter, PSAlarm will reschedule the alarm so the repeat interval begins at restoration time.
    277282            if ( (alarm = [[PSAlarm alloc] initWithPropertyList: plAlarm]) != nil)
    278283                [alarms addObject: alarm];
Note: See TracChangeset for help on using the changeset viewer.