Changeset 102 for trunk/Cocoa/Pester/Source/NJRIntervalField.m
- Timestamp:
- 02/23/03 04:55:07 (21 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Cocoa/Pester/Source/NJRIntervalField.m
r53 r102 38 38 while ( (i = [e nextObject]) != nil) { 39 39 multiplierTag = [i tag]; 40 if (multiplierTag <= 0) continue; 40 41 if (((int)interval % multiplierTag) == 0) { 41 42 NSFormatter *formatter = [self formatter]; … … 64 65 case 'm': case 'M': tag = 60; break; 65 66 case 'h': case 'H': tag = 60 * 60; break; 67 case 'u': case 'U': tag = -2; break; 66 68 default: break; 67 69 } 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 } 69 78 } 70 79 return [super textView: textView shouldChangeTextInRange: range replacementString: string]; … … 73 82 - (void)handleDidFailToFormatString:(NSString *)string errorDescription:(NSString *)error label:(NSString *)label; 74 83 { 75 NSString *alertMessage ;76 NSString *alternateButtonString ;77 NSDecimalNumber *proposedValue ;84 NSString *alertMessage = nil; 85 NSString *alternateButtonString = nil; 86 NSDecimalNumber *proposedValue = nil; 78 87 NSDictionary *contextInfo; 79 88
Note:
See TracChangeset
for help on using the changeset viewer.