2010-04-12 10:21:01 +00:00
|
|
|
/*
|
2012-03-15 18:28:40 +00:00
|
|
|
Copyright 2012 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"
|
2012-07-23 15:04:13 +00:00
|
|
|
#import "ProblemDialog_UI.h"
|
2010-04-12 10:21:01 +00:00
|
|
|
#import "Utils.h"
|
|
|
|
|
|
|
|
@implementation ProblemDialog
|
2012-07-23 15:04:13 +00:00
|
|
|
|
|
|
|
@synthesize model;
|
|
|
|
@synthesize problemTableView;
|
|
|
|
|
2012-01-13 20:25:34 +00:00
|
|
|
- (id)initWithPyRef:(PyObject *)aPyRef
|
2010-04-12 10:21:01 +00:00
|
|
|
{
|
2012-07-23 15:04:13 +00:00
|
|
|
self = [super initWithWindow:nil];
|
|
|
|
self.model = [[PyProblemDialog alloc] initWithModel:aPyRef];
|
|
|
|
[self setWindow:createProblemDialog_UI(self)];
|
|
|
|
problemTable = [[HSTable alloc] initWithPyRef:[self.model problemTable] tableView:problemTableView];
|
2011-11-28 15:45:11 +00:00
|
|
|
[self initializeColumns];
|
2010-04-12 10:21:01 +00:00
|
|
|
return self;
|
|
|
|
}
|
|
|
|
|
|
|
|
- (void)dealloc
|
|
|
|
{
|
|
|
|
[problemTable release];
|
|
|
|
[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];
|
2012-07-23 15:04:13 +00:00
|
|
|
[[problemTable columns] setColumnsAsReadOnly];
|
2010-04-12 10:21:01 +00:00
|
|
|
}
|
|
|
|
@end
|