Ignore:
Timestamp:
03/02/10 08:04:16 (15 years ago)
Author:
Nicholas Riley
Message:

Date autocomplete: replace a bunch of hacks with easier-to-read, less buggy code now we control the field editor.

Still need to move autocompletion into PSTimeDateEditor and fix one small autocomplete bug.

File:
1 edited

Legend:

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

    r622 r623  
    1111
    1212@implementation PSDateFieldEditor
     13
     14- (void)insertText:(id)insertString;
     15{
     16    [super insertText: insertString];
     17    [self complete: nil];
     18    // XXX if we *do* successfully complete, need to delete remainder
     19    // XXX example: in "today", select "t" then retype it
     20}
     21
     22- (void)moveDown:(id)sender;
     23{
     24    [self deleteToEndOfLine: sender];
     25    [self complete: sender];
     26}
     27
     28@end
     29
     30@implementation PSDateFieldEditor (NSCompletion)
    1331
    1432- (NSRange)rangeForUserCompletion;
Note: See TracChangeset for help on using the changeset viewer.