More autocomplete groundwork.

This commit is contained in:
hyatt%netscape.com 2002-04-27 08:47:59 +00:00
parent 6c9718b29e
commit aed4094987
4 changed files with 22 additions and 4 deletions

View File

@ -23,10 +23,12 @@
#import <AppKit/AppKit.h>
#import "BrowserWindowController.h"
#import "CHAutoCompleteDataSource.h"
@interface CHAutoCompleteTableView : NSTableView {
IBOutlet NSTextField* mURLBar;
IBOutlet BrowserWindowController* mWindowController;
CHAutoCompleteDataSource* mDataSource;
}
@end

View File

@ -30,8 +30,8 @@
{
if ((self = [super initWithFrame: aRect])) {
// Create our data source.
CHAutoCompleteDataSource* ds = [[[CHAutoCompleteDataSource alloc] init] autorelease];
[self setDataSource: ds];
mDataSource = [[CHAutoCompleteDataSource alloc] init];
[self setDataSource: mDataSource];
// Create the URL column.
NSTableColumn* urlColumn = [[[NSTableColumn alloc] initWithIdentifier:@"URL"] autorelease];
@ -42,8 +42,15 @@
return self;
}
-(void)dealloc
{
[mDataSource release];
[super dealloc];
}
-(void)controlTextDidChange:(NSNotification*)aNotification
{
// [[[[mWindowController window] contentView] superview] addSubview: self];
}
-(void)controlTextDidEndEditing:(NSNotification*)aNotification

View File

@ -23,10 +23,12 @@
#import <AppKit/AppKit.h>
#import "BrowserWindowController.h"
#import "CHAutoCompleteDataSource.h"
@interface CHAutoCompleteTableView : NSTableView {
IBOutlet NSTextField* mURLBar;
IBOutlet BrowserWindowController* mWindowController;
CHAutoCompleteDataSource* mDataSource;
}
@end

View File

@ -30,8 +30,8 @@
{
if ((self = [super initWithFrame: aRect])) {
// Create our data source.
CHAutoCompleteDataSource* ds = [[[CHAutoCompleteDataSource alloc] init] autorelease];
[self setDataSource: ds];
mDataSource = [[CHAutoCompleteDataSource alloc] init];
[self setDataSource: mDataSource];
// Create the URL column.
NSTableColumn* urlColumn = [[[NSTableColumn alloc] initWithIdentifier:@"URL"] autorelease];
@ -42,8 +42,15 @@
return self;
}
-(void)dealloc
{
[mDataSource release];
[super dealloc];
}
-(void)controlTextDidChange:(NSNotification*)aNotification
{
// [[[[mWindowController window] contentView] superview] addSubview: self];
}
-(void)controlTextDidEndEditing:(NSNotification*)aNotification