Ignore:
Timestamp:
02/23/03 04:55:07 (21 years ago)
Author:
Nicholas Riley
Message:

Pester 1.1b3

File:
1 edited

Legend:

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

    r53 r102  
    3838    while ( (i = [e nextObject]) != nil) {
    3939        multiplierTag = [i tag];
     40        if (multiplierTag <= 0) continue;
    4041        if (((int)interval % multiplierTag) == 0) {
    4142            NSFormatter *formatter = [self formatter];
     
    6465            case 'm': case 'M': tag = 60; break;
    6566            case 'h': case 'H': tag = 60 * 60; break;
     67            case 'u': case 'U': tag = -2; break;
    6668            default: break;
    6769        }
    68         if (tag != -1) [intervalUnits selectItemAtIndex: [intervalUnits indexOfItemWithTag: tag]];
     70        if (tag != -1) {
     71            int itemIndex = [intervalUnits indexOfItemWithTag: tag];
     72            if (itemIndex != -1) {
     73                [intervalUnits selectItemAtIndex: itemIndex];
     74                [[intervalUnits menu] performActionForItemAtIndex: itemIndex];
     75            }
     76            if (tag < 0) return NO; // don't send update
     77        }
    6978    }
    7079    return [super textView: textView shouldChangeTextInRange: range replacementString: string];
     
    7382- (void)handleDidFailToFormatString:(NSString *)string errorDescription:(NSString *)error label:(NSString *)label;
    7483{
    75     NSString *alertMessage;
    76     NSString *alternateButtonString;
    77     NSDecimalNumber *proposedValue;
     84    NSString *alertMessage = nil;
     85    NSString *alternateButtonString = nil;
     86    NSDecimalNumber *proposedValue = nil;
    7887    NSDictionary *contextInfo;
    7988
Note: See TracChangeset for help on using the changeset viewer.