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