зеркало из https://github.com/mozilla/pjs.git
More autocomplete groundwork.
This commit is contained in:
Родитель
d193a192b9
Коммит
a031638ab3
|
@ -21,8 +21,19 @@
|
|||
* David Hyatt <hyatt@netscape.com> (Original Author)
|
||||
*/
|
||||
|
||||
#import <AppKit/AppKit.h>
|
||||
#import "CHAutoCompleteDataSource.h"
|
||||
|
||||
@implementation CHAutoCompleteDataSource
|
||||
|
||||
-(int)numberOfRowsInTableView:(NSTableView*)aTableView
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
-(id)tableView:(NSTableView*)aTableView objectValueForTableColumn:(NSTableColumn*)aTableColumn row:(int)aRowIndex
|
||||
{
|
||||
return @"";
|
||||
}
|
||||
|
||||
@end
|
||||
|
|
|
@ -22,12 +22,28 @@
|
|||
*/
|
||||
|
||||
#import "CHAutoCompleteTableView.h"
|
||||
#import "CHAutoCompleteDataSource.h"
|
||||
|
||||
@implementation CHAutoCompleteTableView
|
||||
|
||||
-(id)initWithFrame:(NSRect)aRect
|
||||
{
|
||||
if ((self = [super initWithFrame: aRect])) {
|
||||
// Create our data source.
|
||||
CHAutoCompleteDataSource* ds = [[[CHAutoCompleteDataSource alloc] init] autorelease];
|
||||
[self setDataSource: ds];
|
||||
|
||||
// Create the URL column.
|
||||
NSTableColumn* urlColumn = [[[NSTableColumn alloc] initWithIdentifier:@"URL"] autorelease];
|
||||
[self addTableColumn: urlColumn];
|
||||
NSTableColumn* titleColumn = [[[NSTableColumn alloc] initWithIdentifier:@"Title"] autorelease];
|
||||
[self addTableColumn: titleColumn];
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
-(void)controlTextDidChange:(NSNotification*)aNotification
|
||||
{
|
||||
printf("Input changed.\n");
|
||||
}
|
||||
|
||||
-(void)controlTextDidEndEditing:(NSNotification*)aNotification
|
||||
|
|
|
@ -21,8 +21,19 @@
|
|||
* David Hyatt <hyatt@netscape.com> (Original Author)
|
||||
*/
|
||||
|
||||
#import <AppKit/AppKit.h>
|
||||
#import "CHAutoCompleteDataSource.h"
|
||||
|
||||
@implementation CHAutoCompleteDataSource
|
||||
|
||||
-(int)numberOfRowsInTableView:(NSTableView*)aTableView
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
-(id)tableView:(NSTableView*)aTableView objectValueForTableColumn:(NSTableColumn*)aTableColumn row:(int)aRowIndex
|
||||
{
|
||||
return @"";
|
||||
}
|
||||
|
||||
@end
|
||||
|
|
|
@ -21,8 +21,19 @@
|
|||
* David Hyatt <hyatt@netscape.com> (Original Author)
|
||||
*/
|
||||
|
||||
#import <AppKit/AppKit.h>
|
||||
#import "CHAutoCompleteDataSource.h"
|
||||
|
||||
@implementation CHAutoCompleteDataSource
|
||||
|
||||
-(int)numberOfRowsInTableView:(NSTableView*)aTableView
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
-(id)tableView:(NSTableView*)aTableView objectValueForTableColumn:(NSTableColumn*)aTableColumn row:(int)aRowIndex
|
||||
{
|
||||
return @"";
|
||||
}
|
||||
|
||||
@end
|
||||
|
|
|
@ -22,12 +22,28 @@
|
|||
*/
|
||||
|
||||
#import "CHAutoCompleteTableView.h"
|
||||
#import "CHAutoCompleteDataSource.h"
|
||||
|
||||
@implementation CHAutoCompleteTableView
|
||||
|
||||
-(id)initWithFrame:(NSRect)aRect
|
||||
{
|
||||
if ((self = [super initWithFrame: aRect])) {
|
||||
// Create our data source.
|
||||
CHAutoCompleteDataSource* ds = [[[CHAutoCompleteDataSource alloc] init] autorelease];
|
||||
[self setDataSource: ds];
|
||||
|
||||
// Create the URL column.
|
||||
NSTableColumn* urlColumn = [[[NSTableColumn alloc] initWithIdentifier:@"URL"] autorelease];
|
||||
[self addTableColumn: urlColumn];
|
||||
NSTableColumn* titleColumn = [[[NSTableColumn alloc] initWithIdentifier:@"Title"] autorelease];
|
||||
[self addTableColumn: titleColumn];
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
-(void)controlTextDidChange:(NSNotification*)aNotification
|
||||
{
|
||||
printf("Input changed.\n");
|
||||
}
|
||||
|
||||
-(void)controlTextDidEndEditing:(NSNotification*)aNotification
|
||||
|
|
|
@ -21,8 +21,19 @@
|
|||
* David Hyatt <hyatt@netscape.com> (Original Author)
|
||||
*/
|
||||
|
||||
#import <AppKit/AppKit.h>
|
||||
#import "CHAutoCompleteDataSource.h"
|
||||
|
||||
@implementation CHAutoCompleteDataSource
|
||||
|
||||
-(int)numberOfRowsInTableView:(NSTableView*)aTableView
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
-(id)tableView:(NSTableView*)aTableView objectValueForTableColumn:(NSTableColumn*)aTableColumn row:(int)aRowIndex
|
||||
{
|
||||
return @"";
|
||||
}
|
||||
|
||||
@end
|
||||
|
|
Загрузка…
Ссылка в новой задаче