Changeset 622 for trunk/Cocoa/Pester/Source/PSAlarmSetController.m
- Timestamp:
- 03/02/10 08:04:08 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Cocoa/Pester/Source/PSAlarmSetController.m
r621 r622 25 25 26 26 #import "PSAlerts.h" 27 #import "PSDateFieldEditor.h" 27 28 #import "PSDockBounceAlert.h" 28 29 #import "PSScriptAlert.h" … … 113 114 [voice setDelegate: self]; // XXX why don't we do this in IB? It should use the accessor... 114 115 [wakeUp setEnabled: [PSPowerManager autoWakeSupported]]; 116 117 dateFieldEditor = [[PSDateFieldEditor alloc] init]; 118 [dateFieldEditor setFieldEditor: YES]; 119 [dateFieldEditor setDelegate: timeDate]; 115 120 116 121 // XXX workaround for 10.1.x and 10.2.x bug which sets the first responder to the wrong field alternately, but it works if I set the initial first responder to nil... go figure. … … 605 610 [completions removeObjectAtIndex: i]; 606 611 } 607 NSLog(@"%@ %d %@", partialMatch, partialLength, completions);608 612 return [completions autorelease]; 609 613 } 610 614 611 615 @end 616 617 @implementation PSAlarmSetController (NSWindowDelegate) 618 619 - (id)windowWillReturnFieldEditor:(NSWindow *)sender toObject:(id)client; 620 { 621 if (client == timeDate) 622 return dateFieldEditor; 623 624 return nil; 625 } 626 627 @end 628 612 629 613 630 @implementation PSAlarmSetController (NSWindowNotifications) … … 629 646 - (void)controlTextDidEndEditing:(NSNotification *)notification; 630 647 { 631 NSControl *control = [notification object]; 632 633 if (control != timeOfDay) 648 if ([notification object] != timeOfDay) 634 649 return; 635 650 … … 683 698 } 684 699 685 // XXX need to override NSTextView; when completing with space or tab, we don't get a selector, which causes usability problems with tab and bugs with space686 700 - (BOOL)control:(NSControl *)control textView:(NSTextView *)textView doCommandBySelector:(SEL)commandSelector; 687 701 {
Note:
See TracChangeset
for help on using the changeset viewer.