dupeguru/cocoa/base/ProblemDialog.m

48 lines
1.2 KiB
Mathematica
Raw Normal View History

/*
2011-04-12 03:04:01 -05:00
Copyright 2011 Hardcoded Software (http://www.hardcoded.net)
2010-09-30 05:17:41 -05:00
This software is licensed under the "BSD" License as described in the "LICENSE" file,
which should be included with this package. The terms are also available at
2010-09-30 05:17:41 -05:00
http://www.hardcoded.net/licenses/bsd_license
*/
#import "ProblemDialog.h"
#import "Utils.h"
@implementation ProblemDialog
- (id)init
{
self = [super initWithWindowNibName:@"ProblemDialog"];
[self window]; //So the detailsTable is initialized.
model = [[PyProblemDialog alloc] initWithModel:findHackishModel(@"problem_dialog")];
problemTable = [[HSTable2 alloc] initWithPyRef:[model problemTable] tableView:problemTableView];
2011-11-28 09:45:11 -06:00
[self initializeColumns];
[model connect];
[[problemTable model] connect];
return self;
}
- (void)dealloc
{
[[problemTable model] disconnect];
[model disconnect];
[problemTable release];
[model release];
[super dealloc];
}
2011-11-28 09:45:11 -06:00
- (void)initializeColumns
{
HSColumnDef defs[] = {
{@"path", 202, 40, 0, NO, nil},
{@"msg", 228, 40, 0, NO, nil},
nil
};
[[problemTable columns] initializeColumns:defs];
}
- (IBAction)revealSelected:(id)sender
{
[model revealSelected];
}
@end