You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

48 lines
1.1 KiB

  1. /*
  2. Copyright 2017 Virgil Dupras
  3. This software is licensed under the "GPLv3" License as described in the "LICENSE" file,
  4. which should be included with this package. The terms are also available at
  5. http://www.gnu.org/licenses/gpl-3.0.html
  6. */
  7. #import "ProblemDialog.h"
  8. #import "Utils.h"
  9. @implementation ProblemDialog
  10. @synthesize model;
  11. @synthesize problemTableView;
  12. - (id)initWithPyRef:(PyObject *)aPyRef
  13. {
  14. self = [super initWithWindowNibName:@"ProblemDialog"];
  15. [self window];
  16. self.model = [[PyProblemDialog alloc] initWithModel:aPyRef];
  17. problemTable = [[HSTable alloc] initWithPyRef:[self.model problemTable] tableView:problemTableView];
  18. [self initializeColumns];
  19. return self;
  20. }
  21. - (void)dealloc
  22. {
  23. [problemTable release];
  24. [super dealloc];
  25. }
  26. - (void)initializeColumns
  27. {
  28. HSColumnDef defs[] = {
  29. {@"path", 202, 40, 0, NO, nil},
  30. {@"msg", 228, 40, 0, NO, nil},
  31. nil
  32. };
  33. [[problemTable columns] initializeColumns:defs];
  34. [[problemTable columns] setColumnsAsReadOnly];
  35. }
  36. - (IBAction)revealSelected:(id)sender
  37. {
  38. [model revealSelected];
  39. }
  40. @end